...
The models should be created based on the existing tables.
Services
none
Frontend
The frontend should group the authorities/rights per managing module. In order to do that the two first digits for the authorities/rights code. The authorities contributed from other modules should be grouped with the associated module’s name.
Role search page
The list of roles should use the same layout as other existing list in openIMIS (claims, insuree ...)
...
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
the add/edit page will have a save button when name is specified
Name must be unique accross record with ValidityTo not Null
preferred solution to assign a authority to Role in the same way the django admin does
Filter search box is a nice to have
Choose all/remove all are should have
...
Another solution is to show checkboxes grouped per entity and module
...
Fields:
)Role Name
(String) - text input, Mandatory
Alternative 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:
...
New card is open (like on create) Rights are duplicated but the Role Name and Alternative Language
remain empty
Solution 2 to retrieve the role (PREFERED)
get the roles that are showed in the django admin, we must be able to retrieve the related INT so we can save them in the database