Skip to content
Browse files

Merge branch 'wip-MDL-25651' of git://github.com/jennymgray/moodle

  • Loading branch information...
2 parents 7974c4e + 52d1a80 commit 1f6788854065a77c753b5d0a56bb92eedb4e7dc8 @skodak skodak committed Apr 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/navigationlib.php
View
4 lib/navigationlib.php
@@ -1653,8 +1653,8 @@ protected function load_for_user($user=null, $forceforcontext=false) {
$usernode->add(get_string('messages', 'message'), $url, self::TYPE_SETTING, null, 'messages');
}
- // TODO: Private file capability check
- if ($iscurrentuser) {
+ $context = get_context_instance(CONTEXT_USER, $USER->id);
+ if ($iscurrentuser && has_capability('moodle/user:manageownfiles', $context)) {
$url = new moodle_url('/user/files.php');
$usernode->add(get_string('myfiles'), $url, self::TYPE_SETTING);
}

0 comments on commit 1f67888

Please sign in to comment.
Something went wrong with that request. Please try again.