forked from extern/egroupware
new acl to view the calendar of a contact, thought every event is private, if you are not a participant
This commit is contained in:
parent
1651819dce
commit
cbc565c0ce
@ -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?
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user