From f1e3a9258dff17b7bb06d15b6d0c57226d3cef51 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 1 Dec 2006 08:15:17 +0000 Subject: [PATCH] ACL update, fixed bug where you can loose some ACL's git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5281 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/acl_definition.inc | 27 ++++++++++++++++++++++++- plugins/admin/groups/class_groupAcl.inc | 6 +++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/plugins/admin/groups/acl_definition.inc b/plugins/admin/groups/acl_definition.inc index 660456aec..5f3b117ac 100644 --- a/plugins/admin/groups/acl_definition.inc +++ b/plugins/admin/groups/acl_definition.inc @@ -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", diff --git a/plugins/admin/groups/class_groupAcl.inc b/plugins/admin/groups/class_groupAcl.inc index 363ef2eac..4e8deee7c 100644 --- a/plugins/admin/groups/class_groupAcl.inc +++ b/plugins/admin/groups/class_groupAcl.inc @@ -52,6 +52,7 @@ class acl extends plugin function execute() { +echo "Pre: $this->current_acl
"; /* 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); } -- 2.30.2