This will now allow members of a group to edit/delete events, if the owner has granted persmissions to do so.

This commit is contained in:
skeeter 2002-01-09 18:12:23 +00:00
parent f6c4bf0bc9
commit 476bec151f
2 changed files with 7 additions and 6 deletions

View File

@ -340,12 +340,13 @@
}
}
function member_of_group()
function member_of_group($owner=0)
{
$group_owners = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']);
$owner = ($owner==0?$GLOBALS['phpgw_info']['user']['account_id']:$owner);
$group_owners = $GLOBALS['phpgw']->accounts->membership();
while($group_owners && list($index,$group_info) = each($group_owners))
{
if($this->owner = $group_info['account_id'])
if($this->owner == $group_info['account_id'])
{
return True;
}

View File

@ -590,9 +590,9 @@
)
);
if($this->bo->owner == $event['owner'])
if($this->bo->owner == $event['owner'] || $this->bo->member_of_group($this->bo->owner))
{
if ($this->bo->check_perms(PHPGW_ACL_EDIT))
if ($this->bo->check_perms(PHPGW_ACL_EDIT,$event['owner']))
{
if($event['recur_type'] != MCAL_RECUR_NONE)
{
@ -637,7 +637,7 @@
echo $p->fp('out','form_button');
}
if ($this->bo->check_perms(PHPGW_ACL_DELETE))
if ($this->bo->check_perms(PHPGW_ACL_DELETE,$event['owner']))
{
if($event['recur_type'] != MCAL_RECUR_NONE)
{