Comment on page
Application User Roles
Application User Roles are a feature that lets you define various roles you can assign to your users, or they can choose between themselves.
You might have parts of your map that can only be accessed by employees, so you define "Employee" and "Visitor" roles. When using the application to search for directions, users assigned to the "Visitor" role may be shown a different route from "Employee" users based on what they have access to.
App User Roles are configured via the MapsIndoors CMS. Go to
Solution Details > App Settings > App Configuration, and find
App User Roleson the page. Here, you can configure existing roles, and add new ones.
Add App User Roleand enter the name of the newly created Role in all defined languages for your Solution.
Assigning or changing App User Roles to users is done in the app itself. The method depends on which platform you're developing for. Here are some examples:
You get all the User Roles available in the loaded solution with
let allUserRoles = MPMapsIndoors.shared.availableUserRoles
let myUserRole = allUserRoles.first
The active User Roles can be set on a global level using
MPMapsIndoors.shared.userRoles = [myUserRole]
The App User Roles are useful for setting limits on who can find certain Locations. App User Rules influence the map in three ways; which Locations are displayed on the map, whether they show up in search results, and the directions you can get.
For any Location defined on the map, there is a menu named
Restrictions, where you are presented with options for limiting functionality certain App User Roles.
- Open for all - All users can view, search for, and get directions to this Location.
- Open for specific App User Roles - Select which App User Roles have access to viewing, searching and getting directions to this specific Location.
- Closed for All - No users will see this Location on the map.
If a Location has been restricted to certain App User Roles, it will not be displayed on the map for those who do not have permission.
Similarly to the effect on the map, if a Location has restrictions, it will not show up in the search results for users without sufficient permissions.
App User Roles can be used to determine the directions users get. For instance, you can restrict Doors between two Locations to only be passable by a certain App User Role.
Note: If you restrict a Room to only be accessible to certain App User Roles, you restrict both directions to and through that Room. It effectively sets restrictions on all Doors leading to that Room as well.
Last modified 15d ago