maybe better permissions check
This commit is contained in:
parent
12481455ca
commit
d63eaeb95a
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,11 @@ class My extends MyPlugin
|
|||
|
||||
public static function checkCustomContext(int $context): ?bool
|
||||
{
|
||||
return in_array($context, [My::BACKEND, My::MANAGE, My::MENU]) ? App::auth()->isSuperAdmin() : null;
|
||||
// Limit to super admin
|
||||
return match($context) {
|
||||
self::MODULE => App::auth()->isSuperAdmin(),
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue