Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
"MDL-22356, disable manage link if user don't have permission to manage"
  • Loading branch information
Dongsheng Cai committed May 7, 2010
1 parent 30f5371 commit 900d460
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion repository/upload/repository.class.php
Expand Up @@ -81,7 +81,10 @@ public function get_listing() {
$ret['nosearch'] = true;
// define upload form in file picker
$ret['upload'] = array('label'=>get_string('attachment', 'repository'), 'id'=>'repo-form');
$ret['manage'] = $CFG->wwwroot .'/files/index.php'; // temporary

if (has_capability('moodle/course:managefiles', $this->context)) {
$ret['manage'] = $CFG->wwwroot .'/files/index.php';
}
$ret['list'] = array();
$ret['dynload'] = false;
return $ret;
Expand Down

0 comments on commit 900d460

Please sign in to comment.