mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-43028 navigation: correct capability check
This commit is contained in:
parent
823c593fc5
commit
b884e46d5d
@ -2,7 +2,12 @@
|
||||
|
||||
// This file defines settingpages and externalpages under the "appearance" category
|
||||
|
||||
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$capabilities = array(
|
||||
'moodle/my:configsyspages',
|
||||
'moodle/tag:manage'
|
||||
);
|
||||
|
||||
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themes')));
|
||||
// "themesettings" settingpage
|
||||
|
@ -45,6 +45,7 @@ require_login();
|
||||
|
||||
$header = "$SITE->shortname: ".get_string('myhome')." (".get_string('mypage', 'admin').")";
|
||||
|
||||
$PAGE->set_blocks_editing_capability('moodle/my:configsyspages');
|
||||
admin_externalpage_setup('mypage', '', null, '', array('pagelayout' => 'mydashboard'));
|
||||
|
||||
// Override pagetype to show blocks properly.
|
||||
|
@ -39,6 +39,7 @@ require_login();
|
||||
|
||||
$header = "$SITE->shortname: ".get_string('publicprofile')." (".get_string('myprofile', 'admin').")";
|
||||
|
||||
$PAGE->set_blocks_editing_capability('moodle/my:configsyspages');
|
||||
admin_externalpage_setup('mypage', '', null, '', array('pagelayout' => 'mydashboard'));
|
||||
|
||||
// Override pagetype to show blocks properly.
|
||||
|
Loading…
x
Reference in New Issue
Block a user