User Role Selection Plugin

Introduction

The User Role Selection Plugin allows users to select multiple roles within a Joget DX 8 app. Joget DX apps typically define roles using a top-down hierarchy, but this plugin adds flexibility by enabling users to switch between multiple roles for accessing a UI (Userview). Key functionalities include:

  • Users with multiple roles can switch and assume one role at a time.
  • The plugin includes a customizable message for role switching in the userview.
  • The role-switching feature is injected into the userview’s subheader using a hash variable.

Get started

Where to get the plugin

You can download the plugin from the GitHub repository.

How to install

  1. Download the plugin JAR file from the releases page.
  2. Go to Settings > Manage Plugins > Upload Plugin.
  3. Once uploaded, the plugin will be available in your Joget environment.

How to use it

For 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,
You can utilize the user role selection plugin to allow an employee to have access to both group permissions.

Configure user role selection
Note that a prior understanding of Joget DX Permission Control is needed. This plugin enhances the versatility of user permission control in Joget DX.
  1. Ensure 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. Set permission roles and groups within the application and customize the permissions as needed in the userview.
  3. In the Permissions option of a permission group, select the User Role using User Group. 
  4. Proceed to map a User Group to the specified Permission Group.

  5. Go to UI Builder Settings > Configure DX 8 Color Admin Advanced > Sub Header.
  6. Add 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)

Download plugin

Created by Julieth Last modified by Aadrian on Nov 19, 2024