forked from extern/egroupware
fix bug that prevented the editing of own infologs, if no grouprights are set, and history config for application infolog is not set
This commit is contained in:
parent
c5de5fd8e2
commit
8d9003fbf8
@ -297,17 +297,18 @@ class infolog_bo
|
||||
{
|
||||
static $cache = array();
|
||||
|
||||
$info_id = is_array($info) ? $info['info_id'] : $info;
|
||||
|
||||
if (!$user) $user = $this->user;
|
||||
if ($user == $this->user)
|
||||
{
|
||||
$grants = $this->grants;
|
||||
$access =& $cache[$info_id][$required_rights]; // we only cache the current user!
|
||||
if ($info_id) $access =& $cache[$info_id][$required_rights]; // we only cache the current user!
|
||||
}
|
||||
else
|
||||
{
|
||||
$grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true,$user);
|
||||
}
|
||||
|
||||
if (!$info)
|
||||
{
|
||||
$owner = $other ? $other : $user;
|
||||
@ -315,7 +316,6 @@ class infolog_bo
|
||||
return $grant & $required_rights;
|
||||
}
|
||||
|
||||
$info_id = is_array($info) ? $info['info_id'] : $info;
|
||||
|
||||
if (!isset($access))
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ class infolog_so
|
||||
if (!$user) $user = $this->user;
|
||||
|
||||
static $um_cache = array();
|
||||
$user_and_memberships =& $um_cache[$user];
|
||||
if ($user == $this->user) $user_and_memberships =& $um_cache[$user];
|
||||
if (!isset($user_and_memberships))
|
||||
{
|
||||
$user_and_memberships = $GLOBALS['egw']->accounts->memberships($user,true);
|
||||
@ -120,7 +120,7 @@ class infolog_so
|
||||
{
|
||||
// dont change our own internal data,
|
||||
$backup_data = $this->data;
|
||||
$info = $this->read((array)$info);
|
||||
$info = $this->read(array('info_id'=>$info));
|
||||
$this->data = $backup_data;
|
||||
}
|
||||
else
|
||||
@ -132,7 +132,6 @@ class infolog_so
|
||||
return False;
|
||||
}
|
||||
$owner = $info['info_owner'];
|
||||
|
||||
$access_ok = $owner == $user || // user has all rights
|
||||
// ACL only on public entrys || $owner granted _PRIVATE
|
||||
(!!($grants[$owner] & $required_rights) ||
|
||||
|
Loading…
Reference in New Issue
Block a user