Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2.6, 3.3.3, 3.4
-
MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-60899-master -
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.