Code

Initial Package acl commit
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Oct 2006 05:55:41 +0000 (05:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Oct 2006 05:55:41 +0000 (05:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4919 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackage.inc
plugins/admin/fai/faiPackage.tpl

index 989ff1be3721db5cb5285e3c58a82f193bb46738..54589793a222a71d5e126113bfc3c6ebb8add786 100644 (file)
@@ -67,8 +67,6 @@ class faiPackage extends plugin
     /* Load Attributes */
     plugin::plugin ($config, $dn);
 
-    $this->acl ="#all#";
-
     /* If "dn==new" we try to create a new entry
      * Else we must read all objects from ldap which belong to this entry.
      * First read SubObjects from ldap ... and then the partition definitions for the SubObjects.
@@ -76,13 +74,6 @@ class faiPackage extends plugin
     if($dn != "new"){
       $this->dn =$dn;
 
-      /* Set acls
-       */
-      $ui   = get_userinfo();
-      $acl  = get_permissions ($this->dn, $ui->subtreeACL);
-      $acli = get_module_permission($acl, "FAIclass", $this->dn);
-      $this->acl=$acli;
-
       /* Get FAIstate
        */
       if(isset($this->attrs['FAIstate'][0])){
@@ -280,7 +271,6 @@ class faiPackage extends plugin
       }
 
       $this->dialog = new faiPackageConfiguration($this->config, $this->dn,$pkg, $path, $pkg_config);
-      $this->dialog ->acl = $this->acl;
       $this->is_dialog =true;
     }
 
@@ -327,12 +317,11 @@ class faiPackage extends plugin
       $strsec .= $sec." ";
     }
 
-    foreach($this->attributes as $attr){
-      $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+    $tmp = $this->plInfo();
+    foreach($tmp['plProvidedAcls'] as $name => $translated){
+      $smarty->assign($name."ACL",$this->getacl($name,preg_match("/freeze/",$this->FAIstate)));
     }
 
-    $smarty->assign("OptionsACL","");
-
     $smarty->assign("releases",$this->releases);
     $smarty->assign("release" ,$this->FAIdebianRelease);
     $smarty->assign("sections",$this->sections);
@@ -557,6 +546,7 @@ class faiPackage extends plugin
             "FAIpackage"        => _("Packages"),
             "FAIdebianSection"  => _("Section"),
             "FAIinstallMethod"  => _("Install Method"),
+            "FAIdebconfInfo"    => _("Package configuration"),
             "FAIdebianRelease"  => _("Release"))
           ));
   }
index 388c1e84852d261a19ca5dcc6d2a118f6df578e6..1dfd31983df2ea27196188a7e1a4622044e0eb4e 100644 (file)
@@ -10,7 +10,9 @@
                                                        </LABEL>
                                                </td>
                                                <td>
+{render acl=$cnACL}
                                                        <input value="{$cn}" size="45" disabled id="cn">
+{/render}
                                                </td>
                                        </tr>
                                        <tr>
@@ -20,7 +22,9 @@
                                                        </LABEL>
                                                </td>
                                                <td>
-                                                       <input value="{$description}" size="45" {$descriptionACL} name="description" id="description">
+{render acl=$descriptionACL}
+                                                       <input value="{$description}" size="45" name="description" id="description">
+{/render}
                                                </td>
                                        </tr>
                                </table>
                                                  {t}Install method{/t} :
                                                </td>
                                                <td>
-                                                       <select name="FAIinstallMethod" {$cnACL} >
+{render acl=$FAIinstallMethodACL}
+                                                       <select name="FAIinstallMethod" title='{t}Please select the installation method{/t}'>
                                                          {html_options options=$FAIinstallMethods output=$FAIinstallMethod selected=$FAIinstallMethod}
                                                        </select>
+{/render}
                                                </td>
                                        </tr>
                                </table>
                                {html_options options=$usedPackages}
                </select>
                        <br>
-                       <input type="submit" name="Addpkg" value="{t}Add{/t}" {$OptionsACL} {$cnACL}>
-                       <input type="submit" name="Delpkg" value="{t}Remove{/t}"  {$OptionsACL} {$cnACL}>
-                       <input type="submit" name="Conpkg" value="{t}Configure{/t}"  {$OptionsACL} >
-                       <input type="submit" name="Markpkg" value="{t}Toggle remove flag{/t}"  {$OptionsACL} {$cnACL}>
+                       <input type="submit" name="Addpkg" value="{t}Add{/t}" {$FAIpackageACL}>
+                       <input type="submit" name="Delpkg" value="{t}Remove{/t}"  {$FAIpackageACL}>
+                       <input type="submit" name="Conpkg" value="{t}Configure{/t}"  {$FAIdebconfInfoACL} >
+                       <input type="submit" name="Markpkg" value="{t}Toggle remove flag{/t}"  {$FAIpackageACL}>
                </td>
        </tr>
 </table>