Index: calendar/inc/class.bocalendar.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v retrieving revision 1.71.2.33.2.19 diff -r1.71.2.33.2.19 class.bocalendar.inc.php 1346c1346,1350 < $access = $user == $owner || $grants & $needed && (!$private || $grants & PHPGW_ACL_PRIVATE); --- > //Added by DG > //Removed first || statement b/c users will not always have rights to add events > //$access = $user == $owner || $grants & $needed && (!$private || $grants & PHPGW_ACL_PRIVATE); > $access = $grants & $needed && (!$private || $grants & PHPGW_ACL_PRIVATE); > //end edit by DG Index: calendar/inc/hook_sidebox_menu.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/calendar/inc/Attic/hook_sidebox_menu.inc.php,v retrieving revision 1.1.2.5 diff -r1.1.2.5 hook_sidebox_menu.inc.php 25a26,34 > //Added by DG > //Added if statement around variables > $file=array(); > if ($GLOBALS['phpgw']->acl->check('readOnly',PHPGW_ACL_ADD,'calendar')){ > $file+=array( > 'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'), > '_NewLine_'=>''); // give a newline > } > //end edit by DG 27,29c36,39 < $file = Array( < 'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'), < '_NewLine_'=>'', // give a newline --- > //Added by DG > //Added + to $file so it will combine the array from above > //Also removed the New Entry and newline from the $file array > $file += Array( 36,37c46,50 < 'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect'), < 'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import') --- > 'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect')//, > //Added by DG > //Temporarily remove Import Link and comma from previous line > //'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import') > //end edit by DG Index: phpgwapi/inc/class.acl.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.acl.inc.php,v retrieving revision 1.65.4.9 diff -r1.65.4.9 class.acl.inc.php 699a700,703 > //Added by DG > //Grab specific user permissions > $user_grants= (($tmp=$this->get_rights('readOnly', $app))?$tmp:1); > //end edit by DG 723c727,731 < $grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31; --- > //Added by DG > //Removed following so user does not always have add entry capabilities > //$grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31; > $grants[$GLOBALS['phpgw_info']['user']['account_id']] =$user_grants; > //end edit by DG 771c779,783 < $grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31; --- > //Added by DG > //Removed following so user does not always have add entry capabilities > //$grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31; > $grants[$GLOBALS['phpgw_info']['user']['account_id']] =$user_grants; > //end edit by DG Index: preferences/inc/class.uiaclprefs.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/preferences/inc/class.uiaclprefs.inc.php,v retrieving revision 1.1.2.4.2.3 diff -r1.1.2.4.2.3 class.uiaclprefs.inc.php 100a101,104 > if ($to_remove['readOnly']){ > $this->acl->delete($GLOBALS['phpgw_info']['flags']['currentapp'],'readOnly'); > unset($to_remove['readOnly']); > } 105a110,138 > /* Added by DG */ > $dg_variable = $_POST['dg_'.$GLOBALS['phpgw_info']['flags']['currentapp']]; > > if (!$dg_variable) > { > $dg_variable = array(); > } > @reset($dg_variable); > $totalacl = array(); > > //User specific > @reset($dg_variable); > while(list($rowinfo,$perm) = each($dg_variable)) > { > list($group_id,$rights) = split('_',$rowinfo); > $totalacl[$group_id] += $rights; > } > @reset($totalacl); > while(list($group_id,$rights) = @each($totalacl)) > { > if($is_group) > { > /* Don't allow group-grants to grant private */ > $rights &= ~PHPGW_ACL_PRIVATE; > } > > $this->acl->add($GLOBALS['phpgw_info']['flags']['currentapp'],'readOnly',$rights); > } > //end edit by DG 114a148 > @reset($group_variable); 161c195 < --- > $processed['readOnly']=$owner; 229a264,266 > //Added by DG > . ' <input type="hidden" name="dg_calendar[readOnly_1]" value="Y">'."\n" > //End edit by DG 261a301,307 > //Added by DG > $this->template->set_var('string',lang('Specific')); > $this->template->parse('row','row_colspan',True); > $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); > $this->display_row($tr_color,'dg_','readOnly',lang('Specific Rights'),$is_group); > //end edit by Dg > 354d399 < 367c412 < $rights_set .= ' disabled'; --- > $rights_set .= ' disabled'; 389c434,443 < $this->check_acl($label,$id,'read',$rights,PHPGW_ACL_READ,($is_group_set && ($rights & PHPGW_ACL_READ) && !$is_group?$is_group_set:False)); --- > //Added by DG > //Cause SPECIFIC calendar to be always readOnly > //Added if statement; function call in else statement is normal > if ($label=='dg_'){ > $this->check_acl($label,$id,'read',$rights,PHPGW_ACL_READ,'readOnly'); > }else{ > $this->check_acl($label,$id,'read',$rights,PHPGW_ACL_READ,($is_group_set && ($rights & PHPGW_ACL_READ && !$is_group)?$is_group_set:False)); > } > //End edit by DG > 394d447 <