mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
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:
parent
f6c4bf0bc9
commit
476bec151f
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user