Only admins can delete super-global or app-level global categories, regardless of owner.

This commit is contained in:
Nathan Gray 2015-09-30 16:24:08 +00:00
parent 718dc25815
commit c4861e1194

View File

@ -371,11 +371,13 @@ class admin_categories
} }
else if (!$GLOBALS['egw_info']['user']['apps']['admin']) else if (!$GLOBALS['egw_info']['user']['apps']['admin'])
{ {
if(!$cats->check_perms(EGW_ACL_EDIT, $row['id'])) if(!$cats->check_perms(EGW_ACL_EDIT, $row['id']) || !self::$acl_edit)
{ {
$row['class'] .= ' rowNoEdit'; $row['class'] .= ' rowNoEdit';
} }
if(!$cats->check_perms(EGW_ACL_DELETE, $row['id'])) if(!$cats->check_perms(EGW_ACL_DELETE, $row['id']) || !self::$acl_delete ||
// Only admins can delete globals
$cats->is_global($row['id']) && !$GLOBALS['egw_info']['user']['apps']['admin'])
{ {
$row['class'] .= ' rowNoDelete'; $row['class'] .= ' rowNoDelete';
} }