From f6b968a4e6d033f1c27031d5b099fb0b8e73d6d5 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Thu, 18 Jun 2009 12:13:13 +0000 Subject: [PATCH] backport of 27275 fixed with klaus the Group initation behavior, Readaccess you can also invite participants, but you can only change the status, if you have edit rights --- calendar/inc/class.calendar_uiforms.inc.php | 27 +++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index ac74c03aa2..c2c80b954d 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -831,14 +831,27 @@ class calendar_uiforms extends calendar_ui $sel_options['status']['G'] = lang('Select one'); foreach($members as $member) { - if (!isset($participants[$member]) && $this->bo->check_perms(EGW_ACL_EDIT,0,$member)) + if (!isset($participants[$member])) { - $preserv['participants'][$row] = $content['participants'][$row] = array( - 'app' => 'Group invitation', - 'uid' => $member, - 'status' => 'G', - ); - $readonlys[$row.'[quantity]'] = $readonlys["delete[$member]"] = true; + //IF Readaccess you can also invite participants, but you can only change the status, if you have edit rights + if ($this->bo->check_perms(EGW_ACL_READ,0,$member) && !$this->bo->check_perms(EGW_ACL_EDIT,0,$member)) + { + $preserv['participants'][$row] = $content['participants'][$row] = array( + 'app' => 'Group invitation', + 'uid' => $member, + 'status' => $status[0], + ); + $readonlys[$row.'[quantity]'] = $readonlys["delete[$member]"] =$readonlys[$row]['status']= true; + } + elseif ($this->bo->check_perms(EGW_ACL_EDIT,0,$member)) + { + $preserv['participants'][$row] = $content['participants'][$row] = array( + 'app' => 'Group invitation', + 'uid' => $member, + 'status' => 'G', + ); + $readonlys[$row.'[quantity]'] = $readonlys["delete[$member]"] = true; + } $content['participants'][$row++]['title'] = $GLOBALS['egw']->common->grab_owner_name($member); } }