Introduction

This plugin allows for multiple user roles selection within a Joget DX app. A Permission Role in a Joget DX app is defined through a top-down hierarchy,
this plugin adds versatility in setting multiple roles to users in accessing a UI (Userview). Functionalities:

  • Users with multiple roles in an app are able to switch and assume one role at a time.
  • Easy-to-use and Customizable message to identify role switching in userview.
  • Injected into the subheader of a userview using a hash variable.

The plugin's source code can be found here.

Installing the plugin: In the Joget DX platform, go to settings > click on manage plugin > click on upload plugin > select the .jar file > upload.

Example Use-case

As an example, a permission role for an Approver and a Financer is set and the corresponding User Groups are assigned. An employee requires access to both user group's permissions in the userview,
we can utilize the user role selection plugin to allow an employee to have access to both group permissions.

Configure User Role Selection

Please note prior understanding in Joget DX Permission Control is needed. This plugin simply enhances versatility in user permission control in Joget DX.

  1. Please make sure that your intended employee's user account is part of the intended user groups. This plugin will only allow users to switch between the assigned groups that the user is a part of.
  2. Simply set permission roles and groups within the application, and customize the permissions as needed in the userview. In the Permissions option of a permission group, select the User Role using User Group. Proceed to map a User Group to the specified Permission Group.

  3. In the Userview Settings > Configure DX 8 Color Admin > Advanced > Sub Header, add in the following hash variable.
    #userRoleSelector.single?noescape#

      Note: The hash variable can be customized to showcase a message within the role-switching button.

    #userRoleSelector.single?noescape#

    (Default)

    #userRoleSelector.single[Current Role:|Switch Role To]?noescape#

    (Custom Message)

Source Code

This plugin source code is available in the JogetOSS repository at https://github.com/jogetoss/user-role-selector.

Plugin Download

You may download it from https://github.com/jogetoss/user-role-selector/releases.

  • No labels