Add captcha tokens management.
This commit is contained in:
@@ -6,10 +6,24 @@ enum Permission: string
|
||||
{
|
||||
case Role = 'role';
|
||||
case User = 'user';
|
||||
case CaptchaToken = 'captcha_token';
|
||||
|
||||
public function getPermissions(): array
|
||||
{
|
||||
return $this->getBasePermissions();
|
||||
$permissions = match ($this) {
|
||||
self::CaptchaToken => [
|
||||
'view' => __('permissions.Allowed to watch all tokens'),
|
||||
'view_own' => __('permissions.Allowed to view own tokens'),
|
||||
'create' => __('permissions.Allowed to create tokens'),
|
||||
'update' => __('permissions.Allowed to edit all tokens'),
|
||||
'update_own' => __('permissions.Allowed to edit own tokens'),
|
||||
'delete' => __('permissions.Allowed to delete all tokens'),
|
||||
'delete_own' => __('permissions.Allowed to delete own tokens'),
|
||||
],
|
||||
default => $this->getBasePermissions()
|
||||
};
|
||||
|
||||
return $permissions;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
Reference in New Issue
Block a user