Objective

The Role management needs to be migrated from the legacy Web Application (Profile menu entry) to the new modular architecture and will be part of the Core module. The Role management, in particular Add/Edit Role screen, should take contributions from the other modules to add additional specific authorities.

Use cases

Web application

Backend

Authority

Entities

Already existing:

Details design

Backend module

Because openIMIS core already have an adapter to read the openIMIS roles and authorities, no business function will be required outside the database updates and Role management.

Mutations

Mutation as part of the schema file:

Permissions

Models

The models should be created based on the existing tables.

Services

none

Frontend

Role search page

The list of roles should use the same layout as other existing list in openIMIS (claims, insuree ...)

Search fields:

search result

column

  1. Role Name (String) - text input (or Alternative Language based on the user setting)

  2. Valid From (Date) - date picker

  3. Valid To (Date) - date picker

  4. System (Boolean) - checkbox

  5. Blocked (Boolean) - checkbox

on each result line the edit/duplicate/delete button should be present but for the historical ones

double click on line should open the role in edit mode unless this is an historical record then it will be read only

Duplicate button open the “new“ page with the authorities form the “to be duplicated“ record preselected but the name is empty

Role add/edit page

Fields:

list of permissions (or authorities )

the authorities will be displayed in two lists, the first one (on the left) showing the authorities NOT assigned to the role (“Available permission“) and the second (on the right) will show the authorities assigned to the roles(“Assigned permission“)

a search box will filter the authorities that have a translated label matching the the filter (icontains)

(nice to have) a arrow “assign all“ (pointing to the right) will be right to “Available permission“ and will move all the displayed permission in the “Available permission“ list to the “Assigned permission“ list; a arrow “remove all“(pointing to the left) will be left to “Assigned permission“ and will move all the displayed permission in“Assigned permission“ list to the “Available permission“ list.

on each line of the “Available permission“ an arrow will be on the right (pointing to the right) of the permission line, once clicked it will move the permission to the “Assigned permission“ list

on each line of the “Assigned permission“ an arrow will be on the left (pointing to the left) of the permission line, once clicked it will move the permission to the “Available permission“ list

(DateValidFrom and To are managed by the backend)
on create:

all fields are editable

on update:

if not system role, all fields are editable

if readonly right or system role: no fields are editable, no save button active

on duplicate

New card is open (like on create) Rights are duplicated but the Role Name and Alternative Language remain empty