Add user access user role client portal
This commit is contained in:
@@ -261,30 +261,46 @@ class NavigationSeeder extends Seeder
|
||||
],
|
||||
'permission' => 'case-management-client-portal'
|
||||
],
|
||||
[
|
||||
'title' => 'User Management',
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'User Role',
|
||||
'path' => '/user-role',
|
||||
'permission' => 'user-role-list-client-portal'
|
||||
],
|
||||
[
|
||||
'title' => 'User Access',
|
||||
'path' => '/user-access',
|
||||
'permission' => 'user-access-list-client-portal'
|
||||
]
|
||||
],
|
||||
'permission' => 'user-management-client-portal'
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($menuItems as $menuItemData) {
|
||||
$menuItem = Navigations::updateOrCreate([
|
||||
'title' => $menuItemData['title'],
|
||||
'permission' => $menuItemData['permission']
|
||||
'permission' => $menuItemData['permission'] ?? null
|
||||
],
|
||||
[
|
||||
'title' => $menuItemData['title'],
|
||||
'path' => $menuItemData['path'] ?? null,
|
||||
'permission' => $menuItemData['permission']
|
||||
'permission' => $menuItemData['permission'] ?? null
|
||||
]);
|
||||
|
||||
if (isset($menuItemData['children'])) {
|
||||
foreach ($menuItemData['children'] as $childData) {
|
||||
$menuItemChildren = Navigations::updateOrCreate([
|
||||
'title' => $childData['title'],
|
||||
'permission' => $childData['permission']
|
||||
'permission' => $childData['permission'] ?? null
|
||||
],
|
||||
[
|
||||
'title' => $childData['title'],
|
||||
'path' => $childData['path'] ?? null,
|
||||
'parent_id' => $menuItem->id,
|
||||
'permission' => $childData['permission']
|
||||
'permission' => $childData['permission'] ?? null
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ class PermissionTableSeeder extends Seeder
|
||||
'formularium-list-client-portal',
|
||||
'case-management-client-portal',
|
||||
'service-monitoring-limit-client-portal',
|
||||
'user-management-client-portal',
|
||||
'user-role-list-client-portal',
|
||||
'user-access-list-client-portal'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user