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
In the _USE_ME folder place the snippet "GroupToRoles_Snippet" onto your page
Once on your page it will look like this
Add as many conditional statements as you would like to fill in the snippet
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.
Download the module here. It will save as BYUGroupRoleMapper.mpk
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.
After the download finishes, import BYUGroupRoleMapper.mpk into your project.
Right click on your Project Explorer
Select Import Module Package
Select the module you just downloaded and click Open