Skip to content

Commit

Permalink
MDL-43028 navigation: correct capability check
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy authored and Rajesh Taneja committed Nov 25, 2013
1 parent 823c593 commit b884e46
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions my/indexsys.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

$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.
Expand Down
1 change: 1 addition & 0 deletions user/profilesys.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

$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.
Expand Down

0 comments on commit b884e46

Please sign in to comment.