Skip to main content

BYU Group to User Role Mapper

Assigns Mendix user roles based on a user's GRO Groups

Documentation

Description

Mendix applications can assign user roles depending on the GRO Groups associated with the user.

Typical Usage Scenario

You would use this module when you want to grant user roles automatically based on a person's GRO Group. For example, anybody who has a GRO Group "development team #1" would automatically be assigned the Administrator user role when they log in.

How to Use

  1. In the _USE_ME folder place the snippet "GroupToRoles_Snippet" onto your page
  2. Once on your page it will look like this
    GroupToRoles_Snippet
  3. Add as many conditional statements as you would like to fill in the snippet
  4. In the same _USE_ME folder add the "SUB_UpdatesRolesFromGroups" into the CustomUserProvisioning microflow in the SAML module. This will allow user roles to be assigned based on the logged in user's GRO groups.

More Information

Within the folder _USE_ME you will find important snippets and microflows for this module. This section will explain what each of these do and any important steps about applying them to your application.

  • GroupToRoles_Snippet
      • Add to a page to view manage all group-to-role pairs.
    • SUB_UpdateRolesFromGroups
      • Should be added to the CustomUserProvisioning microflow in the SAML module. It automatically assigns user roles based on the GRO groups that should be coming back as SAML attributes. It will also create a running total of all GRO groups associated with every user that logs into your application through CAS.

    Dependencies

    Installation

      1. Download the module here. It will save as BYUGroupRoleMapper.mpk
        1. Note: If you are using Mendix Studio Pro 8.8.* or 8.9.* downloading private app store modules/widgets was turned off due to security concerns. All the BYU Private App Store content can still be downloaded from the Company Content page in the Mendix App Store and then imported into those versions of Studio Pro. Upgrading to a newer version of Mendix Studio Pro fixes the problem.
    1. After the download finishes, import BYUGroupRoleMapper.mpk into your project.
      1. Right click on your Project Explorer
      2. Select Import Module Package
      3. Select the module you just downloaded and click Open

    More Resources

    Learn how to install a module in Mendix.

    Slack

    For additional help, refer to the appropriate slack channels in their respective workspaces:

    1. BYU-OIT workspace
      1. #api-management
      2. #mendix
    2. BYU-Web workspace
      1. #mendix-user-group