Create other user route

This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-02-11 14:51:28 +01:00
1 parent accbbe31d9
commit 5e232fd0af
3 files changed
+48

No files matched your search

+4
View File
@@ -12,6 +12,10 @@ class UsersPolicy
return $user->role === 1 || $user->role === 2;
}
public function createOther(User $user): bool {
return $user->role === 1 || $user->role === 2;
}
public function deactivate(User $user, User $userToDeactivate): bool
{
return in_array($user->role, [1, 2])