diff --git a/calendar/inc/class.bocal.inc.php b/calendar/inc/class.bocal.inc.php index e9991de4dd..97e17a2fe8 100644 --- a/calendar/inc/class.bocal.inc.php +++ b/calendar/inc/class.bocal.inc.php @@ -21,6 +21,12 @@ define('HOUR_s',60*60); define('DAY_s',24*HOUR_s); define('WEEK_s',7*DAY_s); +/** + * Gives read access to the calendar, but all events the user is not participating are private! + * Used be the addressbook. + */ +define('EGW_ACL_READ_FOR_PARTICIPANTS',EGW_ACL_CUSTOM_1); + /** * Class to access all calendar data * @@ -271,7 +277,7 @@ class bocal $users = array(); foreach($params['users'] as $user) { - if ($params['ignore_acl'] || $this->check_perms(EGW_ACL_READ,0,$user)) + if ($params['ignore_acl'] || $this->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS,0,$user)) { if ($user && !in_array($user,$users)) // already added? { diff --git a/calendar/inc/class.uical.inc.php b/calendar/inc/class.uical.inc.php index ad33a2439c..649bd5a2ef 100644 --- a/calendar/inc/class.uical.inc.php +++ b/calendar/inc/class.uical.inc.php @@ -189,13 +189,13 @@ class uical foreach($GLOBALS['egw']->accounts->member($owner) as $member) { $member = $member['account_id']; - if (!$this->bo->check_perms(EGW_ACL_READ,0,$member)) + if (!$this->bo->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS,0,$member)) { $no_access_group[$member] = $this->bo->participant_name($member); } } } - elseif (!$this->bo->check_perms(EGW_ACL_READ,0,$owner)) + elseif (!$this->bo->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS,0,$owner)) { $no_access[$owner] = $this->bo->participant_name($owner); }