Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
Extract of #8929. Contains only the
roles_manager
module and other necessary items.Roles are pre-configured sets of permissions automatically assigned when the user is given a new role. This feature allows managers/coordinators to assign permissions to users based on their roles in a study.
New:
fix_role_anomalies
to fix anomalies detected betweenuser/role/permission
tables and*_rel
. E.g. in case a role-permission is inserted but corresponding user-permissions are not.roles
,user_role_rel
,role_permission_rel
.Future changes:
user_accounts
module. This module mainly focuses changes onroles
androle-permissions
. Users that are already assigned to a role will have a permission update once these role permissions are updated. No user-role assignation is done through this module.permission_categories
makes no sens when Roles will be fully integrated. References should be removed and permission categories will become roles.Testing instructions (if applicable)
Module:
SQL/New_patches/2024-02-13_roles_modules.sql
.LORIS front-end > Admin > Roles Manager
.Tool:
php tools/fix_role_anomalies.php
, check that it matches was is needed in db.confirm
option to perform the change in db, check that it was succesfully done.Link(s) to related issue(s)
Linked to #7416