Code

Updated mimetype copy & paste
[gosa.git] / plugins / admin / fai / class_faiScriptEntry.inc
index 2c6bcf0709760777023bec5b0f4c01398ca42d02..f7473c553f4f135c9855df5a53b32d3dfd2eaf53 100644 (file)
@@ -63,7 +63,7 @@ class faiScriptEntry extends plugin
     $smarty     = get_smarty();
     $display = "";
   
-    if(isset($_POST['ImportUpload'])){
+    if(isset($_POST['ImportUpload']) && $this->acl_is_writeable("FAIscript")){
       if(($_FILES['ImportFile']['error']!=0)){
         print_red(_("Please select a valid file."));
       }else
@@ -84,7 +84,7 @@ class faiScriptEntry extends plugin
     }
 
      /* Create download button*/
-    if($this->dn != "new"){
+    if($this->dn != "new" && $this->acl_is_readable("FAIscript")){
       $smarty->assign("DownMe","<a href='getFAIscript.php?id=".base64_encode($this->dn)."'>
         <input type='button' value='"._("Download")."'>
         </a>");
@@ -115,10 +115,12 @@ class faiScriptEntry extends plugin
   {
     if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
       foreach($this->attributes as $attrs){
-        if(isset($_POST[$attrs])){
-          $this->$attrs = $_POST[$attrs];
-        }else{
-          $this->$attrs = "";
+        if($this->acl_is_writeable($attrs)){
+          if(isset($_POST[$attrs])){
+            $this->$attrs = $_POST[$attrs];
+          }else{
+            $this->$attrs = "";
+          }
         }
       }
     }
@@ -170,7 +172,7 @@ class faiScriptEntry extends plugin
           "plDescription" => _("FAI script entry"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 0,
+          "plPriority"    => 19,
           "plSection"     => array("administration"),
           "plCategory"    => array("fai"),
           "plProvidedAcls" => array(