Route skip to access

Component ID

2426355

Component name

Route skip to access

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

See How to skip route if not user access.

This module provides route option "_skip_to_access" to skip route to the next if user does not access to current route.

Example route:

entity.my_entity.edit_form:
  path: '/path/{my_entity}'
  defaults:
    _entity_form: 'my_entity.edit'
  requirements:
    _permission: 'administer my_entity'
  options:
    _skip_to_access: true