Skip to content

Allow placeholders when using RoutePermissionGuard #42

@alexmerlin

Description

@alexmerlin

Feature Request

Allow creating one rule with placeholder in order to avoid the need to specify multiple similar routes with the same permission.

Example:

'guards' => [
    [
        'type'    => 'RoutePermission',
        'options' => [
            'rules' => [
                'admin::admin-create-form' => ['authenticated'],
                'admin::admin-create'      => ['authenticated'],
                'admin::admin-delete-form' => ['authenticated'],

could be reduced to:

'guards' => [
    [
        'type'    => 'RoutePermission',
        'options' => [
            'rules' => [
                'admin::admin-*' => ['authenticated'],
Q A
New Feature yes
RFC no
BC Break no

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions