feat: batasi akses MemberPointResource hanya untuk super_admin
This commit is contained in:
@@ -21,6 +21,11 @@ class MemberPointResource extends Resource
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'Organisasi';
|
||||
protected static ?string $navigationLabel = 'Poin Anggota';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()->hasRole('super_admin');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return MemberPointForm::configure($schema);
|
||||
|
||||
Reference in New Issue
Block a user