diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 995ed61116..1382526245 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -323,7 +323,7 @@ class calendar_boupdate extends calendar_bo $removed[] = $uid; } } - echo "

".__METHOD__."($event[title],".($old_event?'$old_event':'NULL').") returning ".array2string($removed)."

"; + //echo "

".__METHOD__."($event[title],".($old_event?'$old_event':'NULL').") returning ".array2string($removed)."

"; return $removed; } @@ -336,12 +336,21 @@ class calendar_boupdate extends calendar_bo public function check_acl_invite($uid) { if (!is_numeric($uid)) return true; // nothing implemented for resources so far - - if ($this->require_acl_invite == 'group' && $GLOBALS['egw']->accounts->get_type($uid) != 'g') + + if (!$this->require_acl_invite) { - return true; // grant only required for groups + $ret = true; // no grant required } - return $this->check_perms(EGW_ACL_INVITE,0,$uid); + elseif ($this->require_acl_invite == 'group' && $GLOBALS['egw']->accounts->get_type($uid) != 'g') + { + $ret = true; // grant only required for groups + } + else + { + $ret = $this->check_perms(EGW_ACL_INVITE,0,$uid); + } + //error_log(__METHOD__."($uid) = ".array2string($ret)); + return $ret; } /** diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index fb60cf22a0..9edb7a0043 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -292,7 +292,7 @@ class calendar_uiforms extends calendar_ui foreach($this->bo->resources as $type => $data) if ($data['app'] == $app) break; $uid = $this->bo->resources[$type]['app'] == $app ? $type.$id : false; // check if new entry is no account (or contact entry of an account) - if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')) || !$this->bo->check_acl($data)) + if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')) || !$this->bo->check_acl_invite($data)) { if ($uid && $id) {