...
Objective
The module Role management needs to be migrated from the legacy application Web Application (Profile menu entry) to the new modular architecture . This module 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 defines add additional specific authorities.
Use
...
cases
Web application
UC13-1:
search profileSearch Role:
ProfileRole list > enter search criteria > search
UC13-2:
add profileAdd Role:
ProfileRole list > add > select the authorities and define name > save
UC13-3:
update profileUpdate Role:
ProfileRole list > Select Profile > update the authorities and name > save
replace profileUC13-4:
ProfileReplace Role:Role list > Select Profile > update the authorities and name > replace > define replacement date(not in legacy)UC13-5:
remove profileRemove Role: :
ProfileRole list > Select Profile > remove > select replacement
profileRole >
confconfirm
UC13-8: Duplicate
profileRole:
ProfileRole list > Select Profile >duplicate > give the new name
> conf
...
and, if required, update authorities > confirm
Backend
UC13-7: propagation of replacing / removing to user
Authority
Roles
Roles
C/R/U/D
Duplicate
Replace
Entities
(already Already existing):
tblRole
tblRoleRight
Details design
...
Backend module
Because openimis care openIMIS core already have an adapter to read the openIMIS roles and authorityauthorities, no business function will be required outside the database updates and profile replacementsRole management.
Mutations
Mutation as part of the schema file:
create roles => CreateRolesMutation
update roles => UpdateRolesMutation
submit roles => SubmitRolesMutation
replace roles => ReplaceRolesMutationdelete roles => DeleteRolesMutation
duplicate roles => DuplicateRolesMutation
Permissions
"gql_query_roles_perms": ["122001"]
...
"gql_mutation_create_roles_perms": ["122002"]
...
"gql_mutation_update_roles_perms": ["122003"]
...
"gql_mutation_replace_roles_perms": ["122006"]
...
"gql_mutation_duplicate_roles_perms": ["122005"]
...
"gql_mutation_delete_roles_perms": ["122004"]
...
"role_print_perms": ["
...
122001"]
...
Models
the The models should be created based on the existing tables.
Services
none
Front end
...
Frontend
Role search page
The list of role roles should use the same layout as other existing list in openimis openIMIS (claims, insuree ...)
Ideally when reading or editing a role/profile, each module will have a "box" containing its authorities/rights; in read mode, the box will appear only if at least one of the authority right is selected. The box should move according to the screen size.
open point: Xavier Gillmann (Unlicensed) how to get the string for the rights and module name ? should we use the module configurations json ? will it support standard translation ?
Search fields:
Role name
System
blocked
Historical
show history will show the user that have a ValidityTo not NULL and in the PAST
search result
column
Role Name
(String) - text input (orAlternative Language
based on the user setting)Valid From
(Date) - date pickerValid To
(Date) - date pickerSystem
(Boolean) - checkboxBlocked
(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:
Role Name
(String) - text input, MandatoryAlternative Language
(String) - text inputSystem
(Boolean) - checkbox (read only)Blocked
(Boolean) - checkbox
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