Permissions are now managed by user roles and lawyer levels. Each role has predefined permissions that apply to all users with that role. This ensures consistent access control and easier management.
Complete overview of permissions by role and category
| Permission Category | @foreach($rolePermissions as $roleKey => $roleData)
{{ $roleData['label'] }}
|
@endforeach
|---|---|
|
{{ $category }}
{{ implode(', ', array_map(function($p) use ($category) { return str_replace($category === 'Global' ? 'global.' : strtolower($category) . '.', '', $p); }, $permissions)) }}
|
@foreach($rolePermissions as $roleKey => $roleData)
@php
$hasAnyPermission = false;
foreach($permissions as $permission) {
if(in_array($permission, $roleData['permissions'])) {
$hasAnyPermission = true;
break;
}
}
@endphp
@if($hasAnyPermission)
@foreach($permissions as $permission)
@if(in_array($permission, $roleData['permissions']))
@endif
@endforeach
@else
@endif
|
@endforeach
Note: Permissions are automatically assigned based on user roles. Superadmins have all permissions. To change a user's permissions, update their role in the user management section.