forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-40854 fix mod/...:view capabilities
Prior to the fix, if you did not have a capability like mod/page:view, then you woulds still see the link to the Page activity in the course section, but when you clicked on it, you would run into a require_capability error. It is a principle that we never show users a link to a page they are not allowed to access, therefore, when users do not have mod/...:view, they should not see the link on the course page. This patch implements this in the cm_info class, in a similar way to how access restrictions by groups works. It does not assume that the mod/...:view capability exists. If the capability does not exist, then users are not prevented from seeing the link.
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters