|
|
@@ -15,7 +15,7 @@ class UserTypePermissionSeeder extends Seeder
|
|
|
foreach (UserTypeEnum::cases() as $userType) {
|
|
|
$dataToSync = [];
|
|
|
switch ($userType) {
|
|
|
- case UserTypeEnum::ADMIN:
|
|
|
+ case UserTypeEnum::ADMINISTRADOR:
|
|
|
foreach ($allPermissions as $scope => $perm) {
|
|
|
$dataToSync[] = [
|
|
|
'scope' => $scope,
|
|
|
@@ -23,18 +23,26 @@ class UserTypePermissionSeeder extends Seeder
|
|
|
];
|
|
|
}
|
|
|
break;
|
|
|
- case UserTypeEnum::USER:
|
|
|
+
|
|
|
+ case UserTypeEnum::ASSOCIADO:
|
|
|
$dataToSync = [
|
|
|
- ['scope' => 'dashboard', 'bits' => Permission::VIEW],
|
|
|
- ['scope' => 'config.user', 'bits' => Permission::VIEW | Permission::EDIT],
|
|
|
- ['scope' => 'config.city', 'bits' => Permission::VIEW],
|
|
|
- ['scope' => 'config.country', 'bits' => Permission::VIEW],
|
|
|
- ['scope' => 'config.state', 'bits' => Permission::VIEW],
|
|
|
+ ['scope' => 'dashboard', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'parceiro', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'parceiro.convenio','bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'loja', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'loja.item', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'loja.pedido', 'bits' => Permission::VIEW | Permission::ADD | Permission::MENU],
|
|
|
+ ['scope' => 'agendamento', 'bits' => Permission::VIEW | Permission::ADD | Permission::MENU],
|
|
|
];
|
|
|
break;
|
|
|
- case UserTypeEnum::GUEST:
|
|
|
+
|
|
|
+ case UserTypeEnum::PARCEIRO:
|
|
|
$dataToSync = [
|
|
|
- ['scope' => 'config.user', 'bits' => Permission::VIEW],
|
|
|
+ ['scope' => 'dashboard', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
+ ['scope' => 'parceiro', 'bits' => Permission::VIEW | Permission::EDIT | Permission::MENU],
|
|
|
+ ['scope' => 'parceiro.convenio','bits' => Permission::VIEW | Permission::EDIT | Permission::MENU],
|
|
|
+ ['scope' => 'parceiro.servico', 'bits' => Permission::VIEW | Permission::ADD | Permission::EDIT | Permission::DELETE | Permission::MENU],
|
|
|
+ ['scope' => 'agendamento', 'bits' => Permission::VIEW | Permission::MENU],
|
|
|
];
|
|
|
break;
|
|
|
}
|