Attribute with Array

  • dave
    Participant
    # 1 year, 8 months ago

    I tried to drop in this regex into the role mapping for “subscriber” but it did not work. How should regex be added to those fields? Any one know?

    ^\[(?:'(INTL|NMI|NRS|OTHCP|PHA|PSR|PHYS|PA|RET|RNNRS|TR)',?\s?)*\]$

    Nutan Lagad
    Participant
    # 1 year, 8 months ago

    Hi there,

    I hope you are doing well.

    As I understand it, you have an array of memberships that you pass in one of the SAML attributes, and you have a few memberships to which you want to assign subscriber roles, while some memberships you want to deny access to your site and assign a Non-Subscriber role. Please correct me if I am wrong.

    Would I enable regex on the role mapping fields? What would that look like?
    >> Yes, you can enable regex for role mapping in the premium version of our plugin. Please follow the steps below to enable regex for role mapping-
    – Navigate to the Advanced Settings section of the Attribute/Role Mapping tab within the plugin and enable the “Enable Regex for Role Mapping” toggle.
    – Now, navigate to the Role mapping section of the Attribute/Role Mapping tab and here you can use the following pattern to assign the role from the SAML attribute (INTL|NMI|NRS|OTHCP|PHA|PSR|PHYS|PA|RET|RNNRS|TR).

    Further, I would like to inform you that for users whom you want to deny access to your WP site and assign the Non-Subscriber role, you need to define capabilities for the Non-Subscriber role in WordPress such that users with the Non-Subscriber role are not able to access your site. Then, map semicolon-separated memberships in front of your Non-Subscriber custom role. Moreover, if you don’t have capabilities defined for your custom role, you can use the ‘Create/Update the user but assign a ‘None’ role’ option in our plugin. This way, users whose memberships are not mapped with the subscriber role get the none role and cannot access your site.

    Drop us an email at samlsupport@xecurify.com if you would like to see a demo.

    I hope this helps.

    Thanks,
    Nutan

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.