Skip to content
Browse files

Merge branch 'wip-MDL-25651_MOODLE_20_STABLE' of git://github.com/jen…

…nymgray/moodle into MOODLE_20_STABLE
  • Loading branch information...
2 parents 728f3c9 + bf8ff48 commit 27614a5e5d949f4433c7976f7446a755fd4d5a7b @skodak skodak committed Apr 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/navigationlib.php
View
6 lib/navigationlib.php
@@ -1653,9 +1653,9 @@ 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) {
- $url = new moodle_url('/user/files.php');
+ $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 27614a5

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