Option to assign roles through regex configuration

Created on 21 May 2025, 2 months ago

Problem/Motivation

In the application I an creating we have the need for multiple companies to be able to sign in and receive a certain role when doing so.
There is no list of companies to allow since this is something that can be accessed freely and the list would grow constantly.

The current way of setting up the role mapping only supports 1 to 1 mapping and does not suffice for my use case.

Proposed resolution

Make it so the configuration also accepts regex and can match on regex in the Evensubscriber.

Remaining tasks

1. Alter the config field to accept regex
2. Update the Eventsubscriber code to check is the input is a string or regex
3. Add regex matching to the Eventsubscriber code

User interface changes

Make sure to update the helptext of the config form to show that regex is also a possible input

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium LRoels Ghent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @LRoels
  • 🇧🇪Belgium matthijs

    Thanks for your request.

    Just for my understanding: is there a reason why you can't use the <role>-<context> format?
    The company number is normally passed as :<scope> suffix and the module duplicates all <role>-<context>:<scope> roles as <role>-<context> so both mappings can be used.

Production build 0.71.5 2024