wip
This commit is contained in:
@@ -16,6 +16,12 @@ trait NovaEasyPermission
|
||||
/** Create button */
|
||||
public static function authorizedToCreate(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isMe()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +36,7 @@ trait NovaEasyPermission
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isMe()) {
|
||||
if ($user->isSystemUser()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,6 +52,12 @@ trait NovaEasyPermission
|
||||
return;
|
||||
}
|
||||
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isSystemUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new AuthorizationException;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Nova\Resources;
|
||||
|
||||
use App\Modules\SberPaymentOrder\Nova\Resources\Item\NovaSberPaymentOrderItemAuth;
|
||||
use App\Nova\Easy\Permission\NovaEasyPermission;
|
||||
use App\Nova\Resource;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
@@ -25,7 +24,7 @@ class NovaVisaMasterSetting extends Resource
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public static $title = 'name';
|
||||
public static $title = 'display_name';
|
||||
|
||||
/**
|
||||
* The columns that should be searched.
|
||||
|
||||
Reference in New Issue
Block a user