mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Media Manager Upload/Import perms now working as intended. Admins should review this perm on other ADMINs who don't have perm '0'
This commit is contained in:
@@ -1058,8 +1058,12 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
function uploadTab()
|
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.
|
// if 'for' has no value, files are placed in /temp and not added to the db.
|
||||||
$text = '<div id="uploader" rel="'.e_JS.'plupload/upload.php?for='.$this->getQuery('for').'">
|
$text = '<div id="uploader" rel="'.e_JS.'plupload/upload.php?for='.$this->getQuery('for').'">
|
||||||
@@ -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 .= "<li><a data-toggle='tab' href='#core-media-upload'>Upload a File</a></li>";
|
$text .= "<li><a data-toggle='tab' href='#core-media-upload'>Upload a File</a></li>";
|
||||||
}
|
}
|
||||||
@@ -1161,8 +1165,12 @@ class media_admin_ui extends e_admin_ui
|
|||||||
$this->fields['media_category']['readonly'] = TRUE;
|
$this->fields['media_category']['readonly'] = TRUE;
|
||||||
$this->fields['media_url']['noedit'] = TRUE;
|
$this->fields['media_url']['noedit'] = TRUE;
|
||||||
$this->fields['media_userclass']['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 .= $this->CreatePage(); // comment me out to test plupload
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
|
@@ -1311,7 +1311,7 @@ class e_userperms
|
|||||||
"B" => array(LAN_COMMENTMAN,E_16_COMMENT, E_32_COMMENT), // Moderate Comments
|
"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 -
|
"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.
|
"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)
|
"A2"=> array(LAN_MEDIAMANAGER." (".LAN_CATEGORIES.")",E_16_IMAGES, E_32_IMAGES), // Media-Manager (Media-Categories)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user