Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 1.9
-
Component/s: Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
I have this setup
1 user assigned a teacher role at system level (global role)
In course category, teacher role has an override for addnews set to allow
In child course, teacher role has an override for addnews set to prevent
Teacher has no assignment in child course
Go into course as teacher, teacher is able to addnews.
Under old system, the first override at course cat level is 1040, and the override at the course level is 1050 which should take precedence.
The problem lies with the lookup of role definitions in get_user_access_bycontext() which is subtly buggy in that it doesn't realise that it has to read in the override at the course level. I have an initial working patch but won't be able to finish it off today.