This commit is contained in:
2025-09-10 16:15:21 +05:00
parent d157c21883
commit a1521ace7a
3 changed files with 17 additions and 33 deletions

View File

@@ -24,10 +24,6 @@ trait NovaSberPaymentOrderAuth
return;
}
// if ($user->isMe() || $user->isSuperAdmin()) {
// return;
// }
/** @var SberPaymentOrder $resource */
$resource = $this->resource;
if ($resource->user_id == auth()->id()) {
@@ -47,15 +43,7 @@ trait NovaSberPaymentOrderAuth
{
$user = auth()->user();
if ($user->isSystemUser()) {
return true;
}
if ($user->isMe() || $user->isSuperAdmin()) {
return true;
}
return false;
return true;
}
/** View */
@@ -67,10 +55,6 @@ trait NovaSberPaymentOrderAuth
return;
}
if ($user->isMe() || $user->isSuperAdmin()) {
return;
}
/** @var SberPaymentOrder $resource */
$resource = $this->resource;
if ($resource->user_id == auth()->id()) {
@@ -89,10 +73,6 @@ trait NovaSberPaymentOrderAuth
return true;
}
if ($user->isMe() || $user->isSuperAdmin()) {
return true;
}
return false;
}
@@ -101,9 +81,6 @@ trait NovaSberPaymentOrderAuth
{
$user = auth()->user();
if ($user->isMe()) {
return;
}
if ($user->isSystemUser()) {
return;
@@ -127,10 +104,6 @@ trait NovaSberPaymentOrderAuth
return true;
}
if ($user->isMe() || $user->isSuperAdmin()) {
return true;
}
return false;
}
@@ -143,10 +116,6 @@ trait NovaSberPaymentOrderAuth
return;
}
if ($user->isMe() || $user->isSuperAdmin()) {
return;
}
throw new AuthorizationException;
}