phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: news_admin/inc class.boacl.inc.php, 1.1.2.2, 1.


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: news_admin/inc class.boacl.inc.php, 1.1.2.2, 1.1.2.3 class.soacl.inc.php, 1.1.2.1, 1.1.2.2
Date: Wed, 09 Jul 2003 01:02:58 -0400

Update of /cvsroot/phpgroupware/news_admin/inc
In directory subversions:/tmp/cvs-serv20227

Modified Files:
      Tag: Version-0_9_16-branch
        class.boacl.inc.php class.soacl.inc.php 
Log Message:
added group acl support

Index: class.boacl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/class.boacl.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** class.boacl.inc.php 23 Jun 2003 22:56:30 -0000      1.1.2.2
--- class.boacl.inc.php 9 Jul 2003 05:02:55 -0000       1.1.2.3
***************
*** 53,57 ****
                                $this->cats = 
$this->catbo->return_array('all',$this->start,True,$this->query,$this->sort,'cat_name',True);
                        }
!                       $this->permissions = $this->get_permissions();
                }
  
--- 53,57 ----
                                $this->cats = 
$this->catbo->return_array('all',$this->start,True,$this->query,$this->sort,'cat_name',True);
                        }
!                       $this->permissions = $this->get_permissions(True);
                }
  
***************
*** 123,129 ****
  
                //access permissions for current user
!               function get_permissions()
                {
!                       return 
$this->so->get_permissions($GLOBALS['phpgw_info']['user']['account_id']);
                }
        }
--- 123,129 ----
  
                //access permissions for current user
!               function get_permissions($inc_groups = False)
                {
!                       return 
$this->so->get_permissions($GLOBALS['phpgw_info']['user']['account_id'], 
$inc_groups);
                }
        }

Index: class.soacl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/class.soacl.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** class.soacl.inc.php 23 Jun 2003 19:20:52 -0000      1.1.2.1
--- class.soacl.inc.php 9 Jul 2003 05:02:55 -0000       1.1.2.2
***************
*** 40,51 ****
                }
  
!               function get_permissions($user)
                {
                        $result = array();
!                       $sql = "select acl_location, acl_rights from phpgw_acl 
where acl_appname = 'news_admin' and acl_account = $user";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while ($this->db->next_record())
                        {
!                               $result[$this->db->f('acl_location')] = 
$this->db->f('acl_rights');
                        }
                        return $result;
--- 40,63 ----
                }
  
!               function get_permissions($user, $inc_groups)
                {
+                       $groups = 
$GLOBALS['phpgw']->acl->get_location_list_for_id('phpgw_group', 1, $user);
                        $result = array();
!                       $sql  = 'SELECT acl_location, acl_rights FROM phpgw_acl 
';
!                       $sql .= "WHERE acl_appname = 'news_admin' ";
!                       if($inc_groups)
!                       {
!                               $sql .= 'AND acl_account IN('. intval($user);
!                               $sql .= ($groups ? ',' . implode(',', $groups) 
: '');
!                               $sql .= ')';
!                       }
!                       else
!                       {
!                               $sql .= 'AND acl_account ='. intval($user);
!                       }
                        $this->db->query($sql,__LINE__,__FILE__);
                        while ($this->db->next_record())
                        {
!                               $result[$this->db->f('acl_location')] |= 
$this->db->f('acl_rights');
                        }
                        return $result;





reply via email to

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