mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-46783 permissions: let some moodle/ caps be overriden in all mods
The capabilities changed ('contextlevel' => CONTEXT_COURSE changed to 'contextlevel' => CONTEXT_MODULE) are: * moodle/site:accessallgroups * moodle/site:viewfullnames * moodle/site:trustcontent * moodle/site:viewuseridentity This list came from reviewing the _get_extra_capabilities functions in all core activities. They were all somewhat inconsistent, but I think it makes sense that these capabilities are consistently overridable in all activities. E.g. moodle/site:accessallgroups affects conditional availability even if there is no other user of groups, and moodle/site:viewuseridentity and moodle/site:viewfullnames affect the logs report, if nothing else. As a result of this, several _get_extra_capabilities functions are no longer needed, and all the rest have been simplified.
This commit is contained in:
parent
3aca528730
commit
6a58779607
23 changed files with 92 additions and 147 deletions
|
@ -7324,7 +7324,7 @@ function forum_get_forum_types_all() {
|
|||
* @return array
|
||||
*/
|
||||
function forum_get_extra_capabilities() {
|
||||
return array('moodle/site:accessallgroups', 'moodle/site:viewfullnames', 'moodle/site:trustcontent', 'moodle/rating:view', 'moodle/rating:viewany', 'moodle/rating:viewall', 'moodle/rating:rate');
|
||||
return ['moodle/rating:view', 'moodle/rating:viewany', 'moodle/rating:viewall', 'moodle/rating:rate'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue