Code

Added acls to application template.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Aug 2006 08:52:06 +0000 (08:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Aug 2006 08:52:06 +0000 (08:52 +0000)
Added freeze acls.
Fixed problem with selected release

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4387 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationGeneric.inc
plugins/admin/applications/class_applicationManagement.inc
plugins/admin/applications/generic.tpl

index bf90cea8cb900abbbd1f2e2d5c103a005224abef..d58ac6e7cb75a1d3a6b65e13ef707ec7a5826d30 100644 (file)
@@ -166,7 +166,7 @@ class application extends plugin
     $smarty->assign("rand", rand(0, 10000));
 
     /* Variables */
-    foreach(array("description", "gosaApplicationExecute", "gosaApplicationName","cn") as $val){
+    foreach(array("description", "gosaApplicationExecute", "gosaApplicationName","cn","gotoLogonScript","gosaApplicationIcon") as $val){
       $smarty->assign($val, $this->$val);
       $smarty->assign($val."ACL", chkacl($this->acl, $val));
     }
index 1df485d75eb786dc2414615d9f66ae7a978c06fd..db178e4243d313245b7c7ec6109c2a222758a548 100644 (file)
@@ -238,6 +238,13 @@ class applicationManagement extends plugin
       /* Get 'dn' from posted 'applist', must be unique */
       $this->dn= $this->applications[$s_entry]['dn'];
 
+      /* Get faistate to check if this applications is frezzed. 
+         Freezed applications can't be modified anyway */
+      $state = "";
+      if(isset($this->applications[$s_entry]['FAIstate'])){
+        $state = $this->applications[$s_entry]['FAIstate'][0];
+      }
+
       /* Check locking, save current plugin in 'back_plugin', so
          the dialog knows where to return. */
       if (($user= get_lock($this->dn)) != ""){
@@ -252,9 +259,14 @@ class applicationManagement extends plugin
       $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
 
       /* Register apptabs to trigger edit dialog */
-      $this->apptabs= new apptabs($this->config,
-          $this->config->data['TABS']['APPSTABS'], $this->dn);
-      $this->apptabs->set_acl($acl);
+      $this->apptabs= new apptabs($this->config,$this->config->data['TABS']['APPSTABS'], $this->dn);
+
+      /* If this is a freeze assign acl none  */
+      if(preg_match("/freeze/",$state)){
+        $this->apptabs->set_acl(array());
+      }else{
+        $this->apptabs->set_acl($acl);
+      }
       $_SESSION['objectinfo']= $this->dn;
     }
 
index 7c4128216e8aa8a088279f8d19eaf7928100fed0..4877a8802f81a2dd28ffa30ad176e8a825b67605 100644 (file)
@@ -58,9 +58,9 @@
     </td>
     <td style="vertical-align:top">
     &nbsp;<br>
-    <input type="hidden" name="MAX_FILE_SIZE" value="100000">
-    <input name="picture_file" type="file" size="20" maxlength="255" accept="image/*.png" id="picture_file">
-    <input type="submit" name="update" value="{t}Update{/t}" title="{t}Reload picture from LDAP{/t}">
+    <input type="hidden" name="MAX_FILE_SIZE" value="100000" {$gosaApplicationIconACL}>
+    <input name="picture_file" type="file" size="20" maxlength="255" accept="image/*.png" id="picture_file" {$gosaApplicationIconACL}>
+    <input type="submit" name="update" value="{t}Update{/t}" title="{t}Reload picture from LDAP{/t}" {$gosaApplicationIconACL}>
     </td>
     </tr>
    </table>
@@ -97,9 +97,9 @@
        <tr>
                <td>
                        <h2><img src="images/fai_script.png" alt="{t}Script{/t}" align="middle">&nbsp;{t}Script{/t}</h2>
-                       <textarea name="gotoLogonScript" style='width:99%;height:220px;'>{$gotoLogonScript}</textarea>
-                       <input type="file" name="ScriptFile" value="{t}Import{/t}">
-                       <input type="submit" name="upLoad" value="{t}Upload{/t}">
+                       <textarea name="gotoLogonScript" style='width:99%;height:220px;' {$gotoLogonScriptACL}>{$gotoLogonScript}</textarea>
+                       <input type="file" name="ScriptFile" value="{t}Import{/t}" {$gotoLogonScriptACL}>
+                       <input type="submit" name="upLoad" value="{t}Upload{/t}" {$gotoLogonScriptACL}>
                </td>
        </tr>
 </table>