From 7f48378cff14fe867e75e9574edfb46a69aaf7f3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 7 Dec 2011 15:28:32 +0000 Subject: [PATCH] ADD ACL doesn't mean add in infolog, so use edit OR add for new entries --- infolog/inc/class.infolog_bo.inc.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 78ae661d84..d8e594d7a6 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -828,15 +828,13 @@ class infolog_bo if (isset($this->group_owners[$values['info_type']])) { $values['info_owner'] = $this->group_owners[$values['info_type']]; - if ($values['info_id'] && !($this->grants[$this->group_owners[$values['info_type']]] & EGW_ACL_EDIT)) + if (!($this->grants[$this->group_owners[$values['info_type']]] & EGW_ACL_EDIT)) { - if (!$this->check_access($values['info_id'],EGW_ACL_EDIT)) return false; // no edit rights from the group-owner and no implicit rights (delegated and sufficient rights) - } - else if (!$values['info_id'] && !($this->grants[$this->group_owners[$values['info_type']]] & EGW_ACL_ADD)) - { - if (!$this->check_access($values,EGW_ACL_ADD)) + if (!$this->check_access($values['info_id'],EGW_ACL_EDIT) || + !$values['info_id'] && !$this->check_access($values,EGW_ACL_ADD) + ) { - return false; + return false; // no edit rights from the group-owner and no implicit rights (delegated and sufficient rights) } } }