wip
This commit is contained in:
1 parent
0744b372d4
commit
c7b819f6c1
1 file changed
+6
-9
@@ -8,6 +8,7 @@
|
||||
|
||||
trait NovaSberPaymentOrderAuth
|
||||
{
|
||||
/** View */
|
||||
public function authorizeToView(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -23,9 +24,7 @@ public function authorizeToView(Request $request)
|
||||
throw new AuthorizationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit button
|
||||
*/
|
||||
/** Edit button */
|
||||
public function authorizedToUpdate(Request $request): bool
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -37,9 +36,7 @@ public function authorizedToUpdate(Request $request): bool
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit proceess
|
||||
*/
|
||||
/** Update */
|
||||
public function authorizeToUpdate(Request $request): void
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -55,9 +52,7 @@ public function authorizeToUpdate(Request $request): void
|
||||
throw new AuthorizationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete button
|
||||
*/
|
||||
/** Delete button */
|
||||
public function authorizedToDelete(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -69,6 +64,7 @@ public function authorizedToDelete(Request $request)
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Delete */
|
||||
public function authorizeToDelete(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -80,6 +76,7 @@ public function authorizeToDelete(Request $request)
|
||||
throw new AuthorizationException();
|
||||
}
|
||||
|
||||
/** Force delete */
|
||||
public function authorizedToForceDelete(Request $request)
|
||||
{
|
||||
throw_unless(auth()->user()->isMe(), AuthorizationException::class);
|
||||
|
||||
Reference in new issue
Block a user