summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6408d5)
raw | patch | inline | side by side (parent: e6408d5)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Oct 2007 11:51:16 +0000 (11:51 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Oct 2007 11:51:16 +0000 (11:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7536 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 05bdfd5632cb4c979f0801f340ef37802f52f2d1..19e897ea87153d3487e02e76694a2eff534b3055 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
}
-function get_module_permission($acl_array, $module, $dn)
-{
- global $ui;
+function get_module_permission($acl_array, $module, $dn, $checkTag= TRUE)
+ global $ui, $config;
+
+ /* Check for strict tagging */
+ if ($checkTag && isset($config->current['STRICT_UNITS']) &&
+ preg_match('/^(yes|true)$/i', $config->current['STRICT_UNITS']) &&
+ $ui->gosaUnitTag != ""){
+ $size= 0;
+ foreach ($config->tdepartments as $tdn => $tag){
+ if (preg_match("/$tdn$/", $dn)){
+ if (strlen($tdn) > $size){
+ $ttag= $tag;
+ }
+ }
+ }
+
+ /* We have no permission for areas that don't carry our tag */
+ if ($ttag != $ui->gosaUnitTag){
+ return ("#none#");
+ }
+ }
$final= "";
foreach($acl_array as $acl){