wip
This commit is contained in:
1 parent
fe109eb746
commit
d7b1ceb9b8
2 files changed
+14
-3
No files matched your search
@@ -16,6 +16,12 @@ public function authorizedToView(Request $request)
|
||||
/** Create button */
|
||||
public static function authorizedToCreate(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isMe()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +36,7 @@ public function authorizedToUpdate(Request $request): bool
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isMe()) {
|
||||
if ($user->isSystemUser()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,6 +52,12 @@ public function authorizeToUpdate(Request $request): void
|
||||
return;
|
||||
}
|
||||
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isSystemUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new AuthorizationException;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user