maybe better permissions check
This commit is contained in:
parent
e5790dfa23
commit
25588c2d1b
1 changed files with 2 additions and 2 deletions
|
@ -44,9 +44,9 @@ class My extends MyPlugin
|
||||||
|
|
||||||
public static function checkCustomContext(int $context): ?bool
|
public static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
// Only backend and super admin
|
// Limit to super admin
|
||||||
return match ($context) {
|
return match ($context) {
|
||||||
self::MODULE => App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin(),
|
self::MODULE => App::auth()->isSuperAdmin(),
|
||||||
default => null,
|
default => null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue