Code

ACL update, fixed bug where you can loose some ACL's
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Dec 2006 08:15:17 +0000 (08:15 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Dec 2006 08:15:17 +0000 (08:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5281 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/acl_definition.inc
plugins/admin/groups/class_groupAcl.inc

index 660456aec91eb61557ead35b6dd1012b5eaef43d..5f3b117ac03ed3249ca10b75dbb225d584883511 100644 (file)
@@ -102,6 +102,30 @@ $ACLD['terminal']=   array("gotoAdaptPath",
                        "gotoXdmcpServer",
                        "login",
                        "password");
+$ACLD['workgeneric']=   array("base",
+                       "gotoMode",
+                       "gotoSyslogServer",
+                       "gotoNtpServer",
+                       "action",
+                       "password");
+$ACLD['workstartup']=   array("gotoBootKernel",
+                       "gotoKernelParameters",
+                       "FAIdebianMirror",
+                       "FAIclass",
+                       "gotoModules",
+                       "gotoShare");
+$ACLD['workservice']=   array("gotoXKbModel",
+                       "gotoXKbLayout",
+                       "gotoXKbVariant",
+                       "gotoXMouseType",
+                       "gotoXMouseport",
+                       "gotoXResolution",
+                       "gotoXColordepth",
+                       "AutoSync",
+                       "gotoXHsync",
+                       "gotoVHsync",
+                       "gotoScannerEnable",
+                       "gotoXDriver");
 $ACLD['user']=       array("academicTitle",
                        "create",
                        "delete",
@@ -267,7 +291,7 @@ $ACLD['conference']= array(
                        "goFonConferenceOption_c",
                        "goFonConferenceOwner");
 
-$ACLD['gotoEnvironment']=array(
+$ACLD['environment']=array(
                                        "gotoPrinter",
                                        "gotoEnvironment",
                                        "gotoShare",
@@ -284,6 +308,7 @@ $ACLD['gotoEnvironment']=array(
 $ACLD['phpgwAccount']                  =array("phpgwAccount"                   );
 $ACLD['webdavAccount']                 =array("webdavAccount"                  );
 $ACLD['intranetAccount']               =array("intranetAccount"                );
+$ACLD['systems']                       =array("systems"                );
 $ACLD['pptpAccount']                   =array("gosapptp"                               );
 $ACLD['phpscheduleitAccount']  =array("gosaphpscheduleit"              );
 $ACLD['opengwAccount']                 =array( "opengwAccount" =>"Enable/disable account",     
index 363ef2eac585a994ec0ff8b868695c24954393e5..4e8deee7c3da3e3983e7cf001420a45f2160289d 100644 (file)
@@ -52,6 +52,7 @@ class acl extends plugin
 
   function execute()
   {
+echo "Pre: $this->current_acl<br>";
        /* Call parent execute */
        plugin::execute();
 
@@ -116,7 +117,7 @@ class acl extends plugin
        if ($this->object == "all"){
                $this->current_acl= preg_replace ( "/[,]?all[,]?/", "", $this->current_acl);
        }
-       $this->current_acl= preg_replace ( "/(^|[^a-z0-9A-Z])$this->object#[^,]*[,]?/", "", $this->current_acl);
+       $this->current_acl= preg_replace ( "/(^|[^a-z0-9A-Z])$this->object#[^,]*[,]?/", ",", $this->current_acl);
 
        /* assemble new attributes */
        $attrs= "";
@@ -161,6 +162,9 @@ class acl extends plugin
        } else {
                $this->selfflag= FALSE;
        }
+
+       /* Strip trailing colon... */
+       $this->current_acl= preg_replace("/,$/", "", $this->current_acl);
   }