permessions added to user

This commit is contained in:
2023-12-14 19:57:31 +05:00
parent 3d273055e8
commit 4ad386a734
8 changed files with 87 additions and 28 deletions

View File

@@ -48,15 +48,6 @@ class RolePolicy
*/
public function update(User $user, Role $role): bool
{
if (in_array($role->name, [
'king',
'superadmin',
'admin',
'operator',
])) {
return false;
}
if ($user->isAdmin()) {
return true;
}