diff --git a/e107_admin/image.php b/e107_admin/image.php index 463d9e062..af9a76cb3 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1058,8 +1058,12 @@ class media_admin_ui extends e_admin_ui function uploadTab() { - if(!ADMIN){ exit; } //TODO check for upload-access in perms. - + if(!ADMIN){ exit; } + + if(!getperms('A') && !getperms('A1')) + { + return ''; + } // if 'for' has no value, files are placed in /temp and not added to the db. $text = '
@@ -1111,7 +1115,7 @@ class media_admin_ui extends e_admin_ui } - if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') !='glyph') + if(getperms('A|A1') && ($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') !='glyph')) { $text .= "
  • Upload a File
  • "; } @@ -1161,8 +1165,12 @@ class media_admin_ui extends e_admin_ui $this->fields['media_category']['readonly'] = TRUE; $this->fields['media_url']['noedit'] = TRUE; $this->fields['media_userclass']['noedit'] = TRUE; - - $text .= $this->uploadTab(); // To test upload script with plupload + + if(getperms('A|A1')) + { + $text .= $this->uploadTab(); // To test upload script with plupload + } + // $text .= $this->CreatePage(); // comment me out to test plupload $text .= " diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php index 6082a6380..35e45d983 100644 --- a/e107_handlers/user_handler.php +++ b/e107_handlers/user_handler.php @@ -1311,7 +1311,7 @@ class e_userperms "B" => array(LAN_COMMENTMAN,E_16_COMMENT, E_32_COMMENT), // Moderate Comments "6" => array(LAN_MEDIAMANAGER,E_16_FILE, E_32_FILE), // File-Manager - Upload /manage files - "A" => array(LAN_MEDIAMANAGER." (".LAN_ALL.")",E_16_IMAGES, E_32_IMAGES), // Media-Manager All Areas. - "A1"=> array(LAN_MEDIAMANAGER." (".LAN_CREATE."/".LAN_IMPORT.")",E_16_IMAGES, E_32_IMAGES), // Media-Manager (Media Add/Import) + "A1"=> array(LAN_MEDIAMANAGER." (".LAN_UPLOAD."/".LAN_IMPORT.")",E_16_IMAGES, E_32_IMAGES), // Media-Manager (Media Upload/Add/Import) "A2"=> array(LAN_MEDIAMANAGER." (".LAN_CATEGORIES.")",E_16_IMAGES, E_32_IMAGES), // Media-Manager (Media-Categories)