mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Admins can't edit global categories if they're not in Admin app
This commit is contained in:
parent
0aa3d448a6
commit
a7bccd968c
@ -112,7 +112,7 @@ class admin_categories
|
||||
$appname = categories::GLOBAL_APPNAME;
|
||||
}
|
||||
}
|
||||
elseif (!self::$acl_edit || (!$GLOBALS['egw_info']['user']['apps']['admin'] && $content['owner'] != $GLOBALS['egw_info']['user']['account_id']))
|
||||
elseif (!self::$acl_edit || ( $content['owner'] != $GLOBALS['egw_info']['user']['account_id'] && $this->appname != 'admin'))
|
||||
{
|
||||
// only allow to view category
|
||||
$readonlys['__ALL__'] = true;
|
||||
@ -236,7 +236,7 @@ class admin_categories
|
||||
});');
|
||||
|
||||
$readonlys['button[delete]'] = !$content['id'] || !self::$acl_delete || // cant delete not yet saved category
|
||||
(!$GLOBALS['egw_info']['user']['apps']['admin'] && $content['owner'] != $GLOBALS['egw_info']['user']['account_id']);
|
||||
($this->appname != 'admin' && $content['owner'] != $GLOBALS['egw_info']['user']['account_id']);
|
||||
|
||||
$tmpl = new etemplate('admin.categories.edit');
|
||||
$tmpl->exec($this->edit_link,$content,$sel_options,$readonlys,$content+array(
|
||||
|
Loading…
Reference in New Issue
Block a user