refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -38,28 +38,28 @@ class PermissionSeeder extends Seeder
|
||||
//
|
||||
$user = Role::create(
|
||||
[
|
||||
'name' => 'user'
|
||||
'name' => 'user',
|
||||
]
|
||||
);
|
||||
|
||||
$staff = Role::create([
|
||||
'name' => 'staff'
|
||||
'name' => 'staff',
|
||||
]);
|
||||
|
||||
$reviewer = Role::create(
|
||||
[
|
||||
'name' => 'reviewer'
|
||||
'name' => 'reviewer',
|
||||
]
|
||||
);
|
||||
|
||||
$hiringManager = Role::create(
|
||||
[
|
||||
'name' => 'hiringManager'
|
||||
'name' => 'hiringManager',
|
||||
]
|
||||
);
|
||||
|
||||
$admin = Role::create([
|
||||
'name' => 'admin'
|
||||
'name' => 'admin',
|
||||
]);
|
||||
|
||||
// Spatie wildcard permissions (same concept of MC permissions)
|
||||
@@ -101,15 +101,14 @@ class PermissionSeeder extends Seeder
|
||||
'admin.developertools.use',
|
||||
];
|
||||
|
||||
foreach ($permissions as $permission)
|
||||
{
|
||||
foreach ($permissions as $permission) {
|
||||
Permission::create(['name' => $permission]);
|
||||
}
|
||||
|
||||
$user->givePermissionTo([
|
||||
'applications.submit',
|
||||
'applications.view.own',
|
||||
'profiles.view.others'
|
||||
'profiles.view.others',
|
||||
]);
|
||||
|
||||
$staff->givePermissionTo([
|
||||
@@ -121,7 +120,7 @@ class PermissionSeeder extends Seeder
|
||||
// Able to view applications and vote on them once they reach the right stage, but not approve applications up to said stage
|
||||
$reviewer->givePermissionTo([
|
||||
'applications.view.all',
|
||||
'applications.vote'
|
||||
'applications.vote',
|
||||
]);
|
||||
|
||||
$hiringManager->givePermissionTo('admin.viewAllAbsences', 'admin.manageAbsences', 'appointments.*', 'applications.*', 'admin.hiring.*');
|
||||
|
Reference in New Issue
Block a user