phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.23,


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.23,1.71.2.24 class.uicalendar.inc.php,1.66.2.37,1.66.2.38
Date: Tue, 05 Nov 2002 06:19:03 -0500

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv8417

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocalendar.inc.php class.uicalendar.inc.php 
Log Message:
changed handling if a group is selected, to not allow to make the group owner 
of an event
in planner added a owner=<this user> to the add-link, in this case


Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.23
retrieving revision 1.71.2.24
diff -C2 -r1.71.2.23 -r1.71.2.24
*** class.bocalendar.inc.php    31 Oct 2002 10:11:36 -0000      1.71.2.23
--- class.bocalendar.inc.php    5 Nov 2002 11:18:59 -0000       1.71.2.24
***************
*** 1150,1154 ****
                        $grants = $this->grants[$owner];
  
!                       $access = $user == $owner || $grants & $needed && 
(!$private || $grants & PHPGW_ACL_PRIVATE);
                        //echo "<p>rb_check_perms for user $user and needed_acl 
$needed: event=$event[title]: owner=$owner, privat=$private, grants=$grants ==> 
access=$access</p>\n";
  
--- 1150,1161 ----
                        $grants = $this->grants[$owner];
  
!                       if ($GLOBALS['phpgw']->accounts->get_type($owner) == 
'g' && $needed == PHPGW_ACL_ADD)
!                       {
!                               $access = False;        // a group can't be the 
owner of an event
!                       }
!                       else
!                       {
!                               $access = $user == $owner || $grants & $needed 
&& (!$private || $grants & PHPGW_ACL_PRIVATE);
!                       }
                        //echo "<p>rb_check_perms for user $user and needed_acl 
$needed: event=$event[title]: owner=$owner, privat=$private, grants=$grants ==> 
access=$access</p>\n";
  

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.37
retrieving revision 1.66.2.38
diff -C2 -r1.66.2.37 -r1.66.2.38
*** class.uicalendar.inc.php    31 Oct 2002 23:29:35 -0000      1.66.2.37
--- class.uicalendar.inc.php    5 Nov 2002 11:18:59 -0000       1.66.2.38
***************
*** 1450,1453 ****
--- 1450,1461 ----
                                                $hdr[0][$i] = "<b><a 
href=\"$prev_link\">&lt;&lt;</a> &nbsp $month &nbsp <a 
href=\"$next_link\">&gt;&gt;</a></b>";
  
+                                               $add_owner = array();   // if 
no add-rights on the showed cal use own cal
+                                               if (!$this->bo->save_owner && 
!$this->bo->check_perms(PHPGW_ACL_ADD) ||
+                                                   
!$this->bo->check_perms(PHPGW_ACL_ADD,0,$this->bo->save_owner))
+                                               {
+                                                       $add_owner = array(
+                                                               \'owner\' => 
$GLOBALS[\'phpgw_info\'][\'user\'][\'account_id\']
+                                                       );
+                                               }
                                                for ($d=1; $d<=$days; $d++)
                                                {
***************
*** 1482,1486 ****
                                                                                
        \'menuaction\' => \'calendar.uicalendar.add\',
                                                                                
        \'date\' => $date
!                                                                               
)
                                                                        
).\'">\'.$dayname.\'<br>\'.$d.\'</a>\';
                                                }
--- 1490,1494 ----
                                                                                
        \'menuaction\' => \'calendar.uicalendar.add\',
                                                                                
        \'date\' => $date
!                                                                               
) + $add_owner
                                                                        
).\'">\'.$dayname.\'<br>\'.$d.\'</a>\';
                                                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]