summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2d8e2e)
raw | patch | inline | side by side (parent: e2d8e2e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 05:25:13 +0000 (05:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 05:25:13 +0000 (05:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4981 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/gosa.conf | patch | blob | history | |
include/class_plugin.inc | patch | blob | history | |
include/functions.inc | patch | blob | history |
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index 7afd0e727914a5831d6bb771ae5bb7cb91655c38..d182696ee9578e6a19ebda48fedb854f44fced93 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
<tab class="environment" name="Environment" />
<tab class="appgroup" name="Applications" />
<tab class="mailgroup" name="Mail" />
- <tab class="acl" name="ACL" />
</grouptabs>
<appstabs>
index 2f9041e1c81856dde5202bbf9686779959594af5..642676dc054863b760191d3606c19eedc6d88944 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
function remove_snapshot($dn)
{
$ui = get_userinfo();
- $acl = get_permissions ($dn, $ui->subtreeACL);
- $acl = get_module_permission($acl, "snapshot", $dn);
- if($this->acl_is_removeable())
+ if($this->acl_is_removeable()){
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->rmdir_recursive($dn);
diff --git a/include/functions.inc b/include/functions.inc
index 21e35a8220c6fdba8bed1db0f95b298333d67127..286e0a18bb275dd5acbdd2c38405338ada99a816 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
}
-function get_permissions ($dn, $subtreeACL)
+function get_permissions ()
{
- global $config;
-echo "get_permissions() - is deprecated <br>";
- return array("none");
-
- $base= $config->current['BASE'];
- $tmp= "d,".$dn;
- $sacl= array();
-
- /* Sort subacl's for lenght to simplify matching
- for subtrees */
- foreach ($subtreeACL as $key => $value){
- $sacl[$key]= strlen($key);
- }
- arsort ($sacl);
- reset ($sacl);
-
- /* Successively remove leading parts of the dn's until
- it doesn't contain commas anymore */
- $tmp_dn= preg_replace('/\\\\,/', '<GOSA#REPLACED#KOMMA>', $tmp);
- while (preg_match('/,/', $tmp_dn)){
- $tmp_dn= ltrim(strstr($tmp_dn, ","), ",");
- $tmp= preg_replace('/\<GOSA#REPLACED#KOMMA\>/', '\\,', $tmp);
-
- /* Check for acl that may apply */
- foreach ($sacl as $key => $value){
- if (preg_match("/$key$/", $tmp)){
- return ($subtreeACL[$key]);
- }
- }
- }
-
+ /* Look for attribute in ACL */
+ trigger_error("Don't use get_permissions() its obsolete. Use userinfo::get_permissions() instead.");
return array("");
}
-function get_module_permission($acl_array, $module, $dn)
+function get_module_permission()
{
- global $ui;
-echo "get_module_permissions() - to be removed<br>";
-
- $final= "";
- foreach($acl_array as $acl){
-
- /* Check for selfflag (!) in ACL to determine if
- the user is allowed to change parts of his/her
- own account */
- if (preg_match("/^!/", $acl)){
- if ($dn != "" && $dn != $ui->dn){
-
- /* No match for own DN, give up on this ACL */
- continue;
-
- } else {
-
- /* Matches own DN, remove the selfflag */
- $acl= preg_replace("/^!/", "", $acl);
-
- }
- }
-
- /* Remove leading garbage */
- $acl= preg_replace("/^:/", "", $acl);
-
- /* Discover if we've access to the submodule by comparing
- all allowed submodules specified in the ACL */
- $tmp= split(",", $acl);
- foreach ($tmp as $mod){
- if (preg_match("/^$module#/", $mod)){
- $final= strstr($mod, "#")."#";
- continue;
- }
- if (preg_match("/[^#]$module$/", $mod)){
- return ("#all#");
- }
- if (preg_match("/^all$/", $mod)){
- return ("#all#");
- }
- }
- }
-
- /* Return assembled ACL, or none */
- if ($final != ""){
- return (preg_replace('/##/', '#', $final));
- }
-
- /* Nothing matches - disable access for this object */
+ trigger_error("Don't use get_module_permission() its obsolete.");
return ("#none#");
}
}
-function chkacl($acl, $name)
+function chkacl()
{
/* Look for attribute in ACL */
- return ("'\"> CHKACL is deprecated use this::getacl() instead <\"'");
+ trigger_error("Don't use chkacl() its obsolete. Use userinfo::getacl() instead.");
+ return("-deprecated-");
}