-
Bug
-
Resolution: Fixed
-
Major
-
5.0
-
MOODLE_500_STABLE
-
MOODLE_500_STABLE
-
-
-
Follow up from MDL-84126
All of the new capabilities (one example picked at random) define th contextlevel as CONTEXT_USER which means they can never be configured by role in the context of a course and/or activity. The Behat scenarios also currently do not assert real world behaviour, given it's currently impossible to configure these capabilities in course/activity contexts
You can see the context which is used for the capability check here
This means it's rather an "all or nothing" approach currently, and we are side stepping typical capability usage which allows for more fine grained control per context level - e.g. I want to prevent the capability by default at system level, but allow for a specific role in a specific course and/or activity. Or the inverse, I want to enable it for all users at system level (as now), but prohibit it for a specific role in a specific course and/or activity
Basically, it seems we've implemented an artificial limitation in the way the capabilities are currently defined, that prevents the flexibility that we would typically expect within lower context levels
For further discussion around this please see precedent set in MDL-46783
- has been marked as being related by
-
MDL-46783 moodle/site:viewuseridentity & others are relevant to all contexts
-
- Closed
-
-
MDL-85014 PR only: MDL-84884 - The Tiny plugin "use" capabilities are defined in the wrong context level
-
- Closed
-
- is a regression caused by
-
MDL-84126 TinyMCE: Disable plugins by role
-
- Closed
-