Apply no_acl_check to global categories too

This commit is contained in:
Nathan Gray 2012-04-16 16:37:18 +00:00
parent fb69fb21ea
commit ebdc207ff5
2 changed files with 3 additions and 2 deletions

View File

@ -113,7 +113,6 @@ class admin_categories
else
{
$appname = categories::GLOBAL_APPNAME;
$content['all_cats'] = 'all_no_acl';
}
}
elseif ($content['appname'] != $appname || !self::$acl_edit || ( $content['owner'] != $GLOBALS['egw_info']['user']['account_id'] && $this->appname != 'admin'))
@ -247,6 +246,8 @@ class admin_categories
if($this->appname == 'admin')
{
$content['access'] = 'public';
// Allow admins access to all categories as parent
$content['all_cats'] = 'all_no_acl';
$readonlys['owner'] = false;
} else {
$readonlys['owner'] = true;

View File

@ -505,7 +505,7 @@ class categories
}
// Read access to global categories
if ($needed == EGW_ACL_READ && array_intersect(explode(',',$category['owner']),$this->global_owners) &&
if ($needed == EGW_ACL_READ && (array_intersect(explode(',',$category['owner']),$this->global_owners) || $no_acl_check) &&
($category['appname'] == self::GLOBAL_APPNAME || $category['appname'] == $this->app_name))
{
//echo "<p>".__METHOD__."($needed,$category[name]) access because global via memberships</p>\n";