security: expand and complete permissions matrix with granular, enterprise-ready permissions

This commit is contained in:
2026-05-21 22:15:53 +07:00
parent 65804be1cb
commit 7965b34c85
44 changed files with 179 additions and 145 deletions
+2 -2
View File
@@ -33,11 +33,11 @@ class UserPolicy
public function restore(User $authUser, User $user): bool
{
return $authUser->hasPermissionTo('user.delete');
return $authUser->hasPermissionTo('user.restore');
}
public function forceDelete(User $authUser, User $user): bool
{
return $authUser->hasPermissionTo('user.delete') && $authUser->id !== $user->id;
return $authUser->hasPermissionTo('user.force-delete') && $authUser->id !== $user->id;
}
}