Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.2.6, 3.3.3, 3.4
-
Component/s: Blocks, Competencies
-
Testing Instructions:
-
Affected Branches:MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
Fixed Branches:MOODLE_33_STABLE, MOODLE_34_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-60899-master -
Pull Master Diff URL:
Description
The learning plans block causes a user's dashboard page to die with an error message - "Sorry, but you do not currently have permissions to do that (View all learning plans)" - if they don't have any of the following capabilities:
- moodle/competency:planview
- moodle/competency:planviewown
- moodle/competency:planviewdraft
- moodle/competency:planviewowndraft
To reproduce:
- Copy the authenticated users role
- Prohibit the capabilities above
- Set the defaultuserroleid config to the new role
- Ensure that the default dashboard has the learning plans block on it
- Log in as a non-admin user and go to the dashboard - you should see the error above
I would expect the block to show no content where a user doesn't have any capabilities rather than throwing an exception.