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