phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: projects/inc class.soprojects.inc.php, 1.34.2.6.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: projects/inc class.soprojects.inc.php, 1.34.2.6.2.25, 1.34.2.6.2.26
Date: Sat, 23 Aug 2003 10:31:26 -0400

Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv23375/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.soprojects.inc.php 
Log Message:
added project specific acl

Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.34.2.6.2.25
retrieving revision 1.34.2.6.2.26
diff -C2 -r1.34.2.6.2.25 -r1.34.2.6.2.26
*** class.soprojects.inc.php    23 Aug 2003 01:33:08 -0000      1.34.2.6.2.25
--- class.soprojects.inc.php    23 Aug 2003 14:31:24 -0000      1.34.2.6.2.26
***************
*** 40,43 ****
--- 40,44 ----
                        $this->currency = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
                        $this->year             = 
$GLOBALS['phpgw']->common->show_date(time(),'Y');
+                       $this->member   = $this->get_acl_projects();
                }
  
***************
*** 136,140 ****
                                if ($this->isprojectadmin('pad') || 
$this->isbookkeeper('pbo'))
                                {
!                                       $filtermethod = " ( access != 'private' 
OR coordinator = " . $this->account . " )";
                                }
                                else
--- 137,141 ----
                                if ($this->isprojectadmin('pad') || 
$this->isbookkeeper('pbo'))
                                {
!                                       $filtermethod = " ( access != 'private' 
OR coordinator = " . $this->account . ' )';
                                }
                                else
***************
*** 149,158 ****
                                                }
                                                reset($public_user_list);
!                                               $filtermethod .= " OR 
(access='public' AND coordinator in(" . implode(',',$public_user_list) . ")))";
                                        }
!                                       else
                                        {
!                                               $filtermethod .= ' )';
                                        }
                                }
                        }
--- 150,161 ----
                                                }
                                                reset($public_user_list);
!                                               $filtermethod .= " OR 
(access='public' AND coordinator in(" . implode(',',$public_user_list) . '))';
                                        }
! 
!                                       if (is_array($this->member))
                                        {
!                                               $filtermethod .= " OR 
(access='public' AND id in(" . implode(',',$this->member) . '))';
                                        }
+                                       $filtermethod .= ' )';
                                }
                        }
***************
*** 1319,1322 ****
--- 1322,1337 ----
                        $this->db->query("DELETE from phpgw_acl where 
acl_appname='projects' AND acl_location=" . $project_id
                                                        . ' AND 
acl_rights=7',__LINE__,__FILE__);
+               }
+ 
+               function get_acl_projects()
+               {
+                       $this->db->query("SELECT acl_location from phpgw_acl 
where acl_appname = 'projects' and acl_rights=7 and acl_account="
+                                                               . 
$this->account,__LINE__,__FILE__);
+ 
+                       while($this->db->next_record())
+                       {
+                               $projects[] = $this->db->f(0);
+                       }
+                       return $projects;
                }
        }





reply via email to

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