Skip to content

Commit

Permalink
merged fix for MDL-7119, users with no capability should not see role…
Browse files Browse the repository at this point in the history
…s tab
  • Loading branch information
toyomoyo committed Oct 20, 2006
1 parent ffd8a1c commit 20374d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

/// this needs permission checkings

if (!empty($showroles)) { // this variable controls whether this roles is showed, or not, so only user/view page should set this flag
if (!empty($showroles) && has_capability('moodle/role:assign',$usercontext)) { // this variable controls whether this roles is showed, or not, so only user/view page should set this flag
$usercontext = get_context_instance(CONTEXT_USER, $user->id);
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$usercontext->id.'&userid='.$user->id.'&courseid='.$course->id
,get_string('roles'));
Expand Down

0 comments on commit 20374d7

Please sign in to comment.