mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
merged fix for MDL-7119, users with no capability should not see roles tab
This commit is contained in:
parent
ffd8a1cdc5
commit
20374d723b
1 changed files with 1 additions and 1 deletions
|
@ -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'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue