From 92a860046d1f1019298438486e404ed236699b7b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 May 2010 07:47:48 +0000 Subject: [PATCH] Removed hard coded acl class 'all' -Added class core git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18064 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_acl.inc | 5 - gosa-core/include/class_core.inc | 704 +++++++++++++++++++++++++++ gosa-core/include/class_pluglist.inc | 6 - gosa-core/include/class_userinfo.inc | 6 + 4 files changed, 710 insertions(+), 11 deletions(-) create mode 100644 gosa-core/include/class_core.inc diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 0c3448e09..2012f1d13 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -216,8 +216,6 @@ class acl extends plugin } } } - $this->aclObjects['all']= '* '._("All categories"); - $this->ocMapping['all']= array('0' => 'all'); /* Sort categories */ asort($this->aclObjects); @@ -642,9 +640,6 @@ class acl extends plugin } $aclObjects[$this->aclObject.'/'.$class]= $plist[$class]['plDescription']; } - if ($this->aclObject == 'all'){ - $aclObjects['all']= _("All objects in current subtree"); - } /* Role selector if scope is base */ if ($this->aclType == 'role'){ diff --git a/gosa-core/include/class_core.inc b/gosa-core/include/class_core.inc new file mode 100644 index 000000000..f470f3411 --- /dev/null +++ b/gosa-core/include/class_core.inc @@ -0,0 +1,704 @@ + _("All"), + "plDescription" => _("All objects in this category"), + "plSelfModify" => TRUE, + "plDepends" => array(), + "plPriority" => 0, + "plSection" => array("administration"), + "plCategory" => array("all" => array("objectClass" => "none", "description" => '* '._("All"))), + "plProvidedAcls" => array()) + ); + } +} + +class core extends plugin { + + + /*! \brief Add ACL object + @return Returns the ACL object. + */ + static function plInfo() + { + return (array( + "plShortName" => _("Sudo"), + "plDescription" => _("Sudo role"), + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 0, + "plSection" => array("administration"), + "plCategory" => array("sudo" => array("objectClass" => "sudoRole", "description" => _("Sudo role"))), + + "plProperties" => array( + + + array( + "name" => "logging", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "listSummary", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "passwordMinLength", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "passwordMinDiffer", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "passwordHook", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "displayErrors", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "schemaCheck", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "copyPaste", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "forceGlobals", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "forceSSL", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "ldapStats", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "warnSSL", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "ppdGzip", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "ppdPath", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "ldapMaxQueryTime", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "primaryGroupFilter", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "mailQueueScriptPath", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "storeFilterSettings", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sendCompressedOutput", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "modificationDetectionAttribute", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "language", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "theme", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sessionLifetime", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "templateCompileDirectory", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "debugLevel", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sambaHashHook", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "passwordDefaultHash", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "accountPrimaryAttribute", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "userRDN", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "groupRDN", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "gidNumberBase", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "uidNumberBase", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sudoRDN", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "gosaSupportURI", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "gosaSupportTimeout", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "loginAttribute", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "timezone", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "honourUnitTags", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "useSaslForKerberos", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "rfc2307bis", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "personalTitleInDN", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "nextIdHook", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sambaMachineAccountRDN", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "idGenerator", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "strictNamingRules", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "minId", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "mailAttribute", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "gosaSharedPrefix", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "mailUserCreation", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "mailFolderCreation", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "imapTimeout", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "mailMethod", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "cyrusUseSlashes", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "vacationTemplateDirectory", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "ldapTLS", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "honourIvbbAttributes", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sambaIdMapping", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "handleExpiredAccounts", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sambaSID", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "sambaRidBase", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "enableSnapshots", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "snapshotBase", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "snapshotAdminDn", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "snapshotAdminPassword", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE), + + array( + "name" => "snapshotURI", + "type" => "string", + "default" => "", + "description" => "", + "check" => "", + "migrate" => "", + "group" => "core", + "mandatory" => FALSE) + ), + + "plProvidedAcls" => array( + "accessTo" => _("System trust"), + "cn" => _("Name"), + "description" => _("Description"), + "sudoUser" => _("Users"), + "sudoHost" => _("Host"), + "sudoCommand" => _("Command"), + "sudoRunAs" => _("Run as user"), + "trustModel" => _("Access control list")) + ) + ); + } +} +?> diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index ee593b34b..0f89f3b61 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -68,12 +68,6 @@ class pluglist } } - /* Provide field for 'all' */ - $this->info['all']= array(); - $this->info['all']['plProvidedAcls']= array(); - $this->info['all']['plDescription']= _("All objects in this category"); - $this->info['all']['plSelfModify']= FALSE; - if(!session::is_set('maxC')){ session::set('maxC',"RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP"); } diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index 517ca272d..63f82ac37 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -499,6 +499,12 @@ class userinfo } /* Global ACL? */ + if (isset($subacl['acl']['all/all'][0])){ + $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']['all/all'][0]); + continue; + } + + /* Global ACL? - Old style global ACL - Was removed since class_core.inc was created */ if (isset($subacl['acl']['all'][0])){ $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']['all'][0]); continue; -- 2.30.2