-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
2.4.6
-
MOODLE_24_STABLE
-
All users with permission to override permissions (moodle/role:override) and assign certain roles can grant themselves additional permissions, and there isn't a way to configure the system to stop it.
Assume that the user is not allowed to override permissions for their own role (via 'Allow role overrides' checkboxes). What they can do instead is override the permissions for a role that they ARE permitted to change (e.g. Student). Then grant themselves the Student role on the course. Then do whatever it is they want to do; then change the permissions back.
This based on a real incident that happened with our live system.
We think the best way to solve this problem is to make it so that even if you are allowed to override permissions for a role, you cannot grant a capability for any role (change it from any other status -> Allow) if you do not yourself have that capability.
Such capabilities should appear on the list when overriding capabilities, but should be read-only.
There may be an issue with a very few capabilities that are not really capabilities, such as the 'do you appear in completion tracking' capability. I'm not sure what to do about that.
We think this may be a minor security issue. It is a minor issue because it applies only to people with the moodle/role:override permission (or technically moodle/role:safeoverride permission but with much more limited risk in that case), which is people who should be relatively trusted already. However, the ability to control permissions even for relatively trusted users is fairly important.
I am proposing to work on a patch for this issue.
- has been marked as being related by
-
MDL-47661 Manager can allow moodle/site:config for himself
-
- Reopened
-