Permissions API

3 minutes to read Download PDF Edit

Introduction

The Permissions API is an App Service that allows retrieving the user roles a specific user has in your application. There are several ways in which the roles granted to a user in an application can be changed:

  • The role with which the user was invited through the Launchpad, or the role with which the user was invited through the Invite API.
  • User roles for an individual user can be changed from the Launchpad in the Manage App Users screen, provided the user attempting to change these has sufficient privileges.
  • A user may be granted roles through a group policy for a security group he is a member of. Group policies define a specific set of user roles to be granted to members of the security group to which the policy applies, for a specific environment; they can be configured in the Company Admin. Security group membership can be changed through either the Company Admin or the User Management API .

The service is part of the AppCloudServices module, which is available from the App Store, and it’s included in the default themes when creating a new application. Both of these options include a default implementation of the Permissions API.

API Calls

GetRolesForOpenID

Description

Retrieves the user roles for a specific user, based on their OpenID; this will return a list of AppRole objects representing the user roles the user has.

Available in

API Version 1

Parameters

Name Parameter type Required Description
OpenID String Yes OpenID of the user for which you are retrieving the roles.
EnvironmentUUID String Yes UUID of the requesting environment. This should be the value of the AppCloudServices.EnvironmentUUID constant, which the Mendix Cloud Portal will fill in automatically.
EnvironmentPassword String Yes Password of the requesting environment. This should be the value of the AppCloudServices.EnvironmentUUID constant, which the Mendix Cloud Portal will fill in automatically.

Return type

List of PermissionsAPI.AppRole objects

AppRole

Attribute Type Description
UUID String UUID of the user role. Using, this the corresponding System.UserRole object can be retrieved as this UUID will match the UserRole’s ModelGUID attribute.
DisplayName String Name of the user role

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy