Skip to content

Support enable/disable rules on request configuration rules #12704

Description

@offtherailz

Description

requestsConfigurationRules (and legacy authenticationRules) currently apply unconditionally whenever a rule's urlPattern matches. There is no way to activate/deactivate a rule depending on runtime conditions such as the current user's groups or role. This makes it hard to attach different auth headers/params to the same URL pattern depending on who is logged in (e.g. only send a Bearer token for users belonging to a specific group).

Add support for an enabled property on each rule: either a plain boolean, or a plugin expression string using the same syntax already supported for cfg.disablePluginIf (e.g. state('usergroups'), includes(...), hasAtLeastOne(...)). Rules without enabled keep applying unconditionally, so the change is backward compatible.

Acceptance criteria

  • Each entry in requestsConfigurationRules can declare an enabled property (boolean or expression string)
  • Rules with enabled: false are skipped
  • Rules with an expression string are evaluated against the monitored state (same mechanism as cfg.disablePluginIf), e.g. "{includes(state('usergroups'), 'editor')}"
  • Rules without enabled keep the current behaviour (always applied)
  • Legacy authenticationRules converted via convertAuthenticationRulesToRequestConfiguration also respect enabled
  • Documentation updated in local-config.md
  • Unit tests covering: no enabled property, enabled: false, expression resolving to true, expression resolving to false

Other useful information

Implemented in #12702.

Activity

  1. added
    New Feature
    on Jul 21, 2026
  2. added this to the 2026.02.01 milestone on Jul 21, 2026
  3. removed
    New Feature
    on Jul 21, 2026
  4. self-assigned this
    on Jul 21, 2026
  5. added a commit that references this issue on Jul 28, 2026
  6. added a commit that references this issue on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions