phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.13, 1.14 clas


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php, 1.13, 1.14 class.boadmin.inc.php, 1.11, 1.12 class.soadmin.inc.php, 1.8, 1.9 class.uiadmin.inc.php, 1.14, 1.15
Date: Tue, 22 Jul 2003 16:02:02 -0400

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv9778/inc

Modified Files:
        class.acl2.inc.php class.boadmin.inc.php class.soadmin.inc.php 
        class.uiadmin.inc.php 
Log Message:
no message

Index: class.acl2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.acl2.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.acl2.inc.php  18 Jul 2003 21:10:14 -0000      1.13
--- class.acl2.inc.php  22 Jul 2003 20:01:58 -0000      1.14
***************
*** 59,63 ****
                        $expected_args[1] = 
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
                        $expected_args[2] = 
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
!                       $expected_args[3] = 
Array('name'=>'owner_id','default'=>False, 'type'=>'number');
  
                        $recieved_args = func_get_args();
--- 59,64 ----
                        $expected_args[1] = 
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
                        $expected_args[2] = 
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
!                       $expected_args[3] = 
Array('name'=>'owner_id','default'=>False, 'type'=>'any');
!                       $expected_args[4] = 
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
  
                        $recieved_args = func_get_args();
***************
*** 86,110 ****
  //echo $sql;
                        $this->db->query($sql,__LINE__,__FILE__);
!                       $this->db->next_record();
!                       
if($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']] 
== 0)
                        {
!                               
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 0;
!                               
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 0;
!                       }
  
!                       if((int)$this->db->f('acl_type') == 0)
!                       {
!                               
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
!                       }
!                       else
!                       {
!                               
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
!                       }
!                       if(!$this->db->f('acl_rights'))
!                       {
!                               
$this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
  
                        }
  //_debug_array($this->rights_cache);
  
                }
--- 87,126 ----
  //echo $sql;
                        $this->db->query($sql,__LINE__,__FILE__);
!                       while($this->db->next_record())
                        {
!                               
if($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']] 
== 0)
!                               {
!                                       
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 0;
!                               }
  
!                               
if($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']] 
== 0)
!                               {
!                                       
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 0;
!                               }
! 
!                               if((int)$this->db->f('acl_type') == 0)
!                               {
!                                       
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
!                               }
!                               else
!                               {
!                                       
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
!                               }
! 
!                               if(!$this->db->f('acl_rights'))
!                               {
!                                       
$this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
!                                       
$this->masks_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
!                               }
! 
!                               if(!$args['no_effective'])
!                               {
!                                       
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
 = 
$this->bit_mask($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],
 $this->masks_cache[$args['app_id']][$args['account_id']][$args['location']]);
!                               }
  
                        }
+ //_debug_array($args);
  //_debug_array($this->rights_cache);
+ //_debug_array($this->masks_cache);
  
                }
***************
*** 119,122 ****
--- 135,140 ----
                        $expected_args[4] = 
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
                        $expected_args[5] = 
Array('name'=>'no_membership','default'=>false, 'type'=>'number');
+                       $expected_args[6] = 
Array('name'=>'acl_type','default'=>0, 'type'=>'number');
+                       $expected_args[7] = 
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
                        $recieved_args = func_get_args();
                        $args = safe_args($expected_args, 
$recieved_args,__LINE__,__FILE__);
***************
*** 137,142 ****
                        }
  
!                       
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],$args['owner_id']);
!                       return 
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
                }
  
--- 155,167 ----
                        }
  
!                       
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],$args['owner_id'],$args['no_effective']);
!                       if($args['acl_type']==0)
!                       {
!                               return 
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
!                       }
!                       else
!                       {
!                               return 
$this->bit_check($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
!                       }
                }
  
***************
*** 148,153 ****
--- 173,181 ----
                        $expected_args[3] = 
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
                        $expected_args[4] = 
Array('name'=>'no_membership','default'=>false, 'type'=>'number');
+                       $expected_args[5] = 
Array('name'=>'acl_type','default'=>0, 'type'=>'number');
+                       $expected_args[6] = 
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
                        $recieved_args = func_get_args();
                        $args = safe_args($expected_args, 
$recieved_args,__LINE__,__FILE__);
+ 
                        if(!$args['no_membership'])
                        {
***************
*** 165,170 ****
                        }
  
!                       
$this->cache_rights($args['location'],$args['app_id'],$args['account_id']);
!                       return 
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
                }
  
--- 193,205 ----
                        }
  
!                       
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],False,$args['no_effective']);
!                       if($args['acl_type']==0)
!                       {
!                               return 
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
!                       }
!                       else
!                       {
!                               return 
$this->bit_check($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
!                       }
                }
  
***************
*** 242,246 ****
                        }
  
!                       $sql = "SELECT id FROM fm_submodule WHERE (id like 
'%".$args['location']."%')";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while($this->db->next_record())
--- 277,281 ----
                        }
  
!                       $sql = "SELECT id FROM fm_acl_location WHERE (id like 
'%".$args['location']."%')";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while($this->db->next_record())
***************
*** 330,334 ****
                        }
  
!                       $sql = "SELECT id FROM fm_submodule WHERE (id like 
'%".$args['location']."%')";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while($this->db->next_record())
--- 365,369 ----
                        }
  
!                       $sql = "SELECT id FROM fm_acl_location WHERE (id like 
'%".$args['location']."%')";
                        $this->db->query($sql,__LINE__,__FILE__);
                        while($this->db->next_record())

Index: class.boadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.boadmin.inc.php       18 Jul 2003 18:10:03 -0000      1.11
--- class.boadmin.inc.php       22 Jul 2003 20:01:59 -0000      1.12
***************
*** 189,202 ****
                }
  
!               function set_permission($values,$r_processed,$initials)
                {
-                       $this->so->set_initials($initials);
- 
-                       $r_processed=explode("_",$r_processed);
- 
-                       if(!$values)
-                       {
-                               $values = array();
-                       }
                        @reset($values);
                        $totalacl = array();
--- 189,194 ----
                }
  
!               function set_permission2($values,$r_processed,$type)
                {
                        @reset($values);
                        $totalacl = array();
***************
*** 211,215 ****
                                $user_checked[]=$user_id;
  
!                               
$this->acl2->set($this->location,$rights,$user_id,0);
                        }
  
--- 203,207 ----
                                $user_checked[]=$user_id;
  
!                               
$this->acl2->set($this->location,$rights,$user_id,$type);
                        }
  
***************
*** 226,231 ****
                                $user_delete= explode("_",implode("_", 
$user_delete));
  
!                               $this->remove_permission($user_delete);
                        }
  
  //    $this->acl2->check('.invoice.test', $rights,$user_id);
--- 218,245 ----
                                $user_delete= explode("_",implode("_", 
$user_delete));
  
!                               $this->remove_permission($user_delete,$type);
!                       }
!               }
! 
!               function set_permission($values,$r_processed,$initials)
!               {
!                       if($initials)
!                       {
!                               $this->so->set_initials($initials);
!                       }
! 
!                       $r_processed=explode("_",$r_processed);
! 
!                       if(!$values['right'])
!                       {
!                               $values['right'] = array();
                        }
+                       if(!$values['mask'])
+                       {
+                               $values['mask'] = array();
+                       }
+ 
+                       $this->set_permission2($values['right'],$r_processed,0);
+                       $this->set_permission2($values['mask'],$r_processed,1);
  
  //    $this->acl2->check('.invoice.test', $rights,$user_id);
***************
*** 236,247 ****
                }
  
!               function set_grant($values,$r_processed)
                {
-                       $r_processed=explode("_",$r_processed);
- 
-                       if(!$values)
-                       {
-                               $values = array();
-                       }
                        @reset($values);
                        $totalacl = array();
--- 250,255 ----
                }
  
!               function set_grant2($values,$r_processed,$type)
                {
                        @reset($values);
                        $totalacl = array();
***************
*** 256,260 ****
                                $user_checked[]=$user_id;
  
!                               
$this->acl2->set_grant($this->location,$rights,$user_id,0);
                        }
  
--- 264,268 ----
                                $user_checked[]=$user_id;
  
!                               
$this->acl2->set_grant($this->location,$rights,$user_id,$type);
                        }
  
***************
*** 271,280 ****
                                $user_delete= explode("_",implode("_", 
$user_delete));
  
!                               $this->remove_grant($user_delete);
                        }
  
  
! //    $this->acl2->check('.invoice.test', $rights,$user_id);
! //    echo 'rights_cache:<pre>'; print_r($this->acl2->rights_cache); echo 
'</pre>';
  
                        $receipt['message'][] = array('msg' => 
lang('permissions are updated!'));
--- 279,302 ----
                                $user_delete= explode("_",implode("_", 
$user_delete));
  
!                               $this->remove_grant($user_delete,$type);
                        }
  
+               }
  
!               function set_grant($values,$r_processed)
!               {
!                       $r_processed=explode("_",$r_processed);
! 
!                       if(!$values['right'])
!                       {
!                               $values['right'] = array();
!                       }
!                       if(!$values['mask'])
!                       {
!                               $values['mask'] = array();
!                       }
! 
!                       $this->set_grant2($values['right'],$r_processed,0);
!                       $this->set_grant2($values['mask'],$r_processed,1);
  
                        $receipt['message'][] = array('msg' => 
lang('permissions are updated!'));
***************
*** 282,286 ****
                }
  
!               function remove_permission($user_delete)
                {
  
--- 304,308 ----
                }
  
!               function remove_permission($user_delete,$type)
                {
  
***************
*** 291,300 ****
                                for ($j=0;$j<count($right);$j++)
                                {
!                                       
$this->acl2->remove($this->location,$right[$j],$user_delete[$i],0);
                                }
                        }
                }
  
!               function remove_grant($user_delete)
                {
  
--- 313,322 ----
                                for ($j=0;$j<count($right);$j++)
                                {
!                                       
$this->acl2->remove($this->location,$right[$j],$user_delete[$i],$type);
                                }
                        }
                }
  
!               function remove_grant($user_delete,$type)
                {
  
***************
*** 305,309 ****
                                for ($j=0;$j<count($right);$j++)
                                {
!                                       
$this->acl2->remove_grant($this->location,$right[$j],$user_delete[$i],0);
                                }
                        }
--- 327,331 ----
                                for ($j=0;$j<count($right);$j++)
                                {
!                                       
$this->acl2->remove_grant($this->location,$right[$j],$user_delete[$i],$type);
                                }
                        }
***************
*** 321,328 ****
                        $allusers = 
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort, 
$this->order, $this->query);
  
!                       if(is_array($allusers))
                        {
                                $j=0;
!                               while (list($null,$account) = each($allusers))
                                {
                                        if($account['account_id']!=$owner)
--- 343,350 ----
                        $allusers = 
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort, 
$this->order, $this->query);
  
!                       if (isSet($allusers) AND is_array($allusers))
                        {
                                $j=0;
!                               foreach($allusers as $account)
                                {
                                        if($account['account_id']!=$owner)
***************
*** 334,345 ****
                                                $user_list[$j]['initials']      
                = $this->so->get_initials($account['account_id']);
  
!                                               for ($i=0;$i<count($right);$i++)
                                                {
!                                                       
if($this->acl2->check_grant($owner,$this->location, 
$right[$i],$account['account_id'],$app_id,True))
                                                        {
                                                                
$user_list[$j]['right'][$right[$i]] = 'checked';
                                                        }
                                                }
  
                                                $j++;
                                        }
--- 356,392 ----
                                                $user_list[$j]['initials']      
                = $this->so->get_initials($account['account_id']);
  
!                                               $count_right=count($right);
!                                               for ($i=0;$i<$count_right;$i++)
                                                {
!                                                       
if($this->acl2->check_grant($owner,$this->location, 
$right[$i],$account['account_id'],$app_id,True,0,True))
                                                        {
                                                                
$user_list[$j]['right'][$right[$i]] = 'checked';
                                                        }
+                                                       
if($this->acl2->check_grant($owner,$this->location, 
$right[$i],$account['account_id'],$this->app_id,True,1,True))
+                                                       {
+                                                               
$user_list[$j]['mask'][$right[$i]] = 'checked';
+                                                       }
                                                }
  
+                                               if 
(isSet($user_list[$j]['mask']) AND is_array($user_list[$j]['mask']))
+                                               {
+                                                       $result_temp    = 
@array_diff(array_keys($user_list[$j]['right']), 
array_keys($user_list[$j]['mask']));
+                                                       if (isSet($result_temp) 
AND is_array($result_temp))
+                                                       {
+                                                               
foreach($result_temp as $temp)
+                                                               {
+                                                                       
$user_list[$j]['result'][$temp] = 'checked';
+                                                               }
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       
$user_list[$j]['result'] = $user_list[$j]['right'];
+                                               }
+ 
+                                               $user_list[$j]['right']['type'] 
= 'right';
+                                               $user_list[$j]['mask']['type'] 
= 'mask';
+                                               
$user_list[$j]['result']['type'] = 'result';
+ 
                                                $j++;
                                        }
***************
*** 356,453 ****
  
  
!               function get_user_list2()
                {
- 
                        $right=$this->right;
  
!                       if(!$this->cat_id)
!                       {
! 
!                               $users = 
$GLOBALS['phpgw']->accounts->get_list('accounts', $this->start,$this->sort, 
$this->order, $this->query);
!                               $groups = 
$GLOBALS['phpgw']->accounts->get_list('groups', $this->start,$this->sort, 
$this->order, $this->query);
  
!                               if(is_array($groups))
                                {
!                                       $j=0;
!                                       while (list($null,$account) = 
each($groups))
!                                       {
!                                               $user_list[$j]['type']          
                = 'groups';
!                                               $user_list[$j]['account_id']    
        = $account['account_id'];
!                                               $user_list[$j]['account_lid']   
        = $account['account_lid'];
!                                               
$user_list[$j]['account_firstname'] = $account['account_firstname'];
!                                               
$user_list[$j]['account_lastname']      = $account['account_lastname'];
  
!                                               for ($i=0;$i<count($right);$i++)
                                                {
!                                                       
if($this->acl2->check($this->location, 
$right[$i],$account['account_id'],$this->app_id,True))
!                                                       {
!                                                               
$user_list[$j]['right'][$right[$i]] = 'checked';
!                                                       }
                                                }
- 
-                                               $j++;
                                        }
-                               }
  
!                               if(is_array($users))
!                               {
!                                       while (list($null,$account) = 
each($users))
                                        {
!                                               $user_list[$j]['type']          
                = 'accounts';
!                                               $user_list[$j]['account_id']    
        = $account['account_id'];
!                                               $user_list[$j]['account_lid']   
        = $account['account_lid'];
!                                               
$user_list[$j]['account_firstname'] = $account['account_firstname'];
!                                               
$user_list[$j]['account_lastname']      = $account['account_lastname'];
!                                               $user_list[$j]['initials']      
                = $this->so->get_initials($account['account_id']);
! 
!                                               for ($i=0;$i<count($right);$i++)
                                                {
!                                                       
if($this->acl2->check($this->location, 
$right[$i],$account['account_id'],$this->app_id,True))
                                                        {
!                                                               
$user_list[$j]['right'][$right[$i]] = 'checked';
                                                        }
                                                }
- 
-                                               $j++;
                                        }
!                               }
! 
!                       }
!                       else
!                       {
!                               $allusers = 
$GLOBALS['phpgw']->accounts->get_list($this->cat_id, $this->start,$this->sort, 
$this->order, $this->query);
! 
! //_debug_array($allusers);
!                               if(is_array($allusers))
!                               {
!                                       $j=0;
!                                       while (list($null,$account) = 
each($allusers))
                                        {
!                                               $user_list[$j]['type']          
                = $this->cat_id;
!                                               $user_list[$j]['account_id']    
        = $account['account_id'];
!                                               $user_list[$j]['account_lid']   
        = $account['account_lid'];
!                                               
$user_list[$j]['account_firstname'] = $account['account_firstname'];
!                                               
$user_list[$j]['account_lastname']      = $account['account_lastname'];
!                                               $user_list[$j]['initials']      
                = $this->so->get_initials($account['account_id']);
  
!                                               for ($i=0;$i<count($right);$i++)
!                                               {
!                                                       
if($this->acl2->check($this->location, 
$right[$i],$account['account_id'],$this->app_id,True))
!                                                       {
!                                                               
$user_list[$j]['right'][$right[$i]] = 'checked';
!                                                       }
!                                               }
  
!                                               $j++;
!                                       }
                                }
- 
                        }
  
!                       $this->total_records = count($user_list);
! 
  //_debug_array($user_list);
  
- //    echo 'rights_cache:<pre>'; print_r($this->acl2->rights_cache); echo 
'</pre>';
                        return $user_list;
                }
--- 403,463 ----
  
  
!               function get_user_list2($type='',$app_id='')
                {
                        $right=$this->right;
  
!                       $allusers = 
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort, 
$this->order, $this->query);
  
!                       if (isSet($allusers) AND is_array($allusers))
!                       {
!                               $j=0;
!                               foreach($allusers as $account)
                                {
!                                       $user_list[$j]['account_id']            
= $account['account_id'];
!                                       $user_list[$j]['account_lid']           
= $account['account_lid'];
!                                       $user_list[$j]['account_firstname'] = 
$account['account_firstname'];
!                                       $user_list[$j]['account_lastname']      
= $account['account_lastname'];
!                                       $user_list[$j]['initials']              
        = $this->so->get_initials($account['account_id']);
  
!                                       $count_right=count($right);
!                                       for ($i=0;$i<$count_right;$i++)
!                                       {
!                                               
if($this->acl2->check($this->location, 
$right[$i],$account['account_id'],$this->app_id,True,0,True))
                                                {
!                                                       
$user_list[$j]['right'][$right[$i]] = 'checked';
!                                               }
!                                               
if($this->acl2->check($this->location, 
$right[$i],$account['account_id'],$this->app_id,True,1,True))
!                                               {
!                                                       
$user_list[$j]['mask'][$right[$i]] = 'checked';
                                                }
                                        }
  
!                                       if (isSet($user_list[$j]['mask']) AND 
is_array($user_list[$j]['mask']))
                                        {
!                                               $result_temp    = 
@array_diff(array_keys($user_list[$j]['right']), 
array_keys($user_list[$j]['mask']));
!                                               if (isSet($result_temp) AND 
is_array($result_temp))
                                                {
!                                                       foreach($result_temp as 
$temp)
                                                        {
!                                                               
$user_list[$j]['result'][$temp] = 'checked';
                                                        }
                                                }
                                        }
!                                       else
                                        {
!                                               $user_list[$j]['result'] = 
$user_list[$j]['right'];
!                                       }
  
!                                       $user_list[$j]['right']['type'] = 
'right';
!                                       $user_list[$j]['mask']['type'] = 'mask';
!                                       $user_list[$j]['result']['type'] = 
'result';
  
!                                       $j++;
                                }
                        }
  
!                       $this->total_records = $this->total_records + 
count($user_list);
  //_debug_array($user_list);
  
                        return $user_list;
                }

Index: class.soadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.soadmin.inc.php       9 Jul 2003 11:12:16 -0000       1.8
--- class.soadmin.inc.php       22 Jul 2003 20:01:59 -0000      1.9
***************
*** 48,52 ****
                {
  
!                       $this->db->query("SELECT * FROM fm_submodule ORDER BY 
id ");
  
                                $i = 0;
--- 48,52 ----
                {
  
!                       $this->db->query("SELECT * FROM fm_acl_location ORDER 
BY id ");
  
                                $i = 0;

Index: class.uiadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uiadmin.inc.php       10 Jul 2003 21:11:38 -0000      1.14
--- class.uiadmin.inc.php       22 Jul 2003 20:01:59 -0000      1.15
***************
*** 96,104 ****
                                                'lid'                           
        => $user['account_lid'],
                                                'name'                          
        => $user['account_firstname'] . ' ' . $user['account_lastname'],
!                                               'read'                          
        => $user['right'][1],
!                                               'add'                           
        => $user['right'][2],
!                                               'edit'                          
        => $user['right'][4],
!                                               'delete'                        
        => $user['right'][8],
!                                               'manager'                       
        => $user['right'][16]
                                        );
                                }
--- 96,119 ----
                                                'lid'                           
        => $user['account_lid'],
                                                'name'                          
        => $user['account_firstname'] . ' ' . $user['account_lastname'],
!                                               'read_right'                    
        => $user['right'][1],
!                                               'add_right'                     
                => $user['right'][2],
!                                               'edit_right'                    
        => $user['right'][4],
!                                               'delete_right'                  
        => $user['right'][8],
!                                               'read_mask'                     
                => $user['mask'][1],
!                                               'add_mask'                      
                => $user['mask'][2],
!                                               'edit_mask'                     
                => $user['mask'][4],
!                                               'delete_mask'                   
        => $user['mask'][8],
!                                               'read_result'                   
        => $user['result'][1],
!                                               'add_result'                    
        => $user['result'][2],
!                                               'edit_result'                   
        => $user['result'][4],
!                                               'delete_result'                 
        => $user['result'][8],
!                                               'lang_right'                    
        => lang('right'),
!                                               'lang_mask'                     
                => lang('mask'),
!                                               'lang_result'                   
        => lang('result'),
!                                               'lang_read'                     
                => lang('Read'),                                //1
!                                               'lang_add'                      
                => lang('Add'),                                 //2
!                                               'lang_edit'                     
                => lang('Edit'),                                //4
!                                               'lang_delete'                   
        => lang('Delete'),                              //8
!                                               'type'                          
                => 'users'
                                        );
                                }
***************
*** 118,126 ****
                                                'lid'                           
        => $group['account_lid'],
                                                'name'                          
        => $group['account_firstname'],
!                                               'read'                          
        => $group['right'][1],
!                                               'add'                           
        => $group['right'][2],
!                                               'edit'                          
        => $group['right'][4],
!                                               'delete'                        
        => $group['right'][8],
!                                               'manager'                       
        => $group['right'][16]
                                        );
                                }
--- 133,156 ----
                                                'lid'                           
        => $group['account_lid'],
                                                'name'                          
        => $group['account_firstname'],
!                                               'read_right'                    
        => $group['right'][1],
!                                               'add_right'                     
                => $group['right'][2],
!                                               'edit_right'                    
        => $group['right'][4],
!                                               'delete_right'                  
        => $group['right'][8],
!                                               'read_mask'                     
                => $group['mask'][1],
!                                               'add_mask'                      
                => $group['mask'][2],
!                                               'edit_mask'                     
                => $group['mask'][4],
!                                               'delete_mask'                   
        => $group['mask'][8],
!                                               'read_result'                   
        => $group['result'][1],
!                                               'add_result'                    
        => $group['result'][2],
!                                               'edit_result'                   
        => $group['result'][4],
!                                               'delete_result'                 
        => $group['result'][8],
!                                               'lang_right'                    
        => lang('right'),
!                                               'lang_mask'                     
                => lang('mask'),
!                                               'lang_result'                   
        => lang('result'),
!                                               'lang_read'                     
                => lang('Read'),                                //1
!                                               'lang_add'                      
                => lang('Add'),                                 //2
!                                               'lang_edit'                     
                => lang('Edit'),                                //4
!                                               'lang_delete'                   
        => lang('Delete'),                              //8
!                                               'type'                          
                => 'groups'
                                        );
                                }
***************
*** 185,188 ****
--- 215,219 ----
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'cat_id'                                        
        => $this->cat_id,
+                               'permission'                                    
=> False,
  
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
***************
*** 190,196 ****
                                'query'                                         
        => $this->query,
                                'lang_search'                                   
=> lang('search'),
!                               'table_header_grants'                   => 
$table_header,
!                               'values_grants_groups'                  => 
$groups,
!                               'values_grants_users'                   => 
$users,
                                'lang_no_location'                              
=> lang('No location'),
                                'lang_location_statustext'              => 
lang('Select submodule'),
--- 221,227 ----
                                'query'                                         
        => $this->query,
                                'lang_search'                                   
=> lang('search'),
!                               'table_header_permission'               => 
$table_header,
!                               'values_groups'                                 
=> $groups,
!                               'values_users'                                  
=> $users,
                                'lang_no_location'                              
=> lang('No location'),
                                'lang_location_statustext'              => 
lang('Select submodule'),
***************
*** 204,208 ****
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg . ': ' . 
$owner_name;
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_grants' => $data));
                        $this->save_sessiondata();
  
--- 235,239 ----
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg . ': ' . 
$owner_name;
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_permission' => $data));
                        $this->save_sessiondata();
  
***************
*** 228,255 ****
                        if ($this->location)
                        {
!                               $user_list = $this->bo->get_user_list2();
  
!                               while (is_array($user_list) && list(,$user) = 
each($user_list))
                                {
!                                       $processed[] = $user['account_id'];
!                                       $content[] = array
!                                       (
!                                               'account_id'                    
=> $user['account_id'],
!                                               'lid'                           
        => $user['account_lid'],
!                                               'firstname'                     
        => $user['account_firstname'],
!                                               'lastname'                      
        => $user['account_lastname'],
!                                               'read'                          
        => $user['right'][1],
!                                               'add'                           
        => $user['right'][2],
!                                               'edit'                          
        => $user['right'][4],
!                                               'delete'                        
        => $user['right'][8],
!                                               'manager'                       
        => $user['right'][16],
!                                               'janitor'                       
        => $user['right'][32],
!                                               'supervisor'                    
=> $user['right'][64],
!                                               'budget_responsible'    => 
$user['right'][128],
!                                               'initials'                      
        => $user['initials'],
!                                               'type'                          
        => $user['type']
!                                       );
                                }
  
                                address@hidden("_", $processed);
                        }
--- 259,368 ----
                        if ($this->location)
                        {
!                               if(!$this->cat_id || $this->cat_id=='accounts')
!                               {
!                                       $user_list = 
$this->bo->get_user_list2('accounts',$app_id);
!                               }
  
!                               if (isSet($user_list) AND is_array($user_list))
                                {
!                                       foreach($user_list as $user)
!                                       {
!                                               $processed[] = 
$user['account_id'];
!                                               $users[] = array
!                                               (
!                                                       'account_id'            
                => $user['account_id'],
!                                                       'lid'                   
                        => $user['account_lid'],
!                                                       'name'                  
                        => $user['account_firstname'] . ' ' . 
$user['account_lastname'],
!                                                       'read_right'            
                => $user['right'][1],
!                                                       'add_right'             
                        => $user['right'][2],
!                                                       'edit_right'            
                => $user['right'][4],
!                                                       'delete_right'          
                => $user['right'][8],
!                                                       'manage_right'          
                => $user['right'][16],
!                                                       'janitor_right'         
                => $user['right'][32],
!                                                       'supervisor_right'      
                => $user['right'][64],
!                                                       
'budget_responsible_right'      => $user['right'][128],
!                                                       'read_mask'             
                        => $user['mask'][1],
!                                                       'add_mask'              
                        => $user['mask'][2],
!                                                       'edit_mask'             
                        => $user['mask'][4],
!                                                       'delete_mask'           
                => $user['mask'][8],
!                                                       'manage_mask'           
                => $user['mask'][16],
!                                                       'janitor_mask'          
                => $user['mask'][32],
!                                                       'supervisor_mask'       
                => $user['mask'][64],
!                                                       
'budget_responsible_mask'       => $user['mask'][128],
!                                                       'read_result'           
                => $user['result'][1],
!                                                       'add_result'            
                => $user['result'][2],
!                                                       'edit_result'           
                => $user['result'][4],
!                                                       'delete_result'         
                => $user['result'][8],
!                                                       'manage_result'         
                => $user['result'][16],
!                                                       'janitor_result'        
                => $user['result'][32],
!                                                       'supervisor_result'     
                => $user['result'][64],
!                                                       
'budget_responsible_result'     => $user['result'][128],
!                                                       'initials'              
                        => $user['initials'],
!                                                       'lang_right'            
                => lang('right'),
!                                                       'lang_mask'             
                        => lang('mask'),
!                                                       'lang_result'           
                => lang('result'),
!                                                       'lang_read'             
                        => lang('Read'),                                //1
!                                                       'lang_add'              
                        => lang('Add'),                                 //2
!                                                       'lang_edit'             
                        => lang('Edit'),                                //4
!                                                       'lang_delete'           
                => lang('Delete'),                              //8
!                                                       'lang_manage'           
                => lang('Manage'),                              //16
!                                                       'lang_janitor'          
                => lang('Janitor'),                             //32
!                                                       'lang_supervisor'       
                => lang('Supervisor'),                  //64
!                                                       
'lang_budget_responsible'       => lang('Budget Responsible'),  //128
!                                                       'lang_initials'         
                => lang('Initials'),
!                                                       'type'                  
                        => 'users'
!                                               );
!                                       }
!                               }
! 
!                               if(!$this->cat_id || $this->cat_id=='groups')
!                               {
!                                       $group_list = 
$this->bo->get_user_list2('groups',$app_id);
!                               }
! 
!                               if (isSet($group_list) AND 
is_array($group_list))
!                               {
!                                       foreach($group_list as $group)
!                                       {
!                                               $processed[] = 
$group['account_id'];
!                                               $groups[] = array
!                                               (
!                                                       'account_id'            
        => $group['account_id'],
!                                                       'lid'                   
                => $group['account_lid'],
!                                                       'name'                  
                => $group['account_firstname'],
!                                                       'read_right'            
                => $group['right'][1],
!                                                       'add_right'             
                        => $group['right'][2],
!                                                       'edit_right'            
                => $group['right'][4],
!                                                       'delete_right'          
                => $group['right'][8],
!                                                       'manage_right'          
                => $group['right'][16],
!                                                       'read_mask'             
                        => $group['mask'][1],
!                                                       'add_mask'              
                        => $group['mask'][2],
!                                                       'edit_mask'             
                        => $group['mask'][4],
!                                                       'delete_mask'           
                => $group['mask'][8],
!                                                       'manage_mask'           
                => $group['mask'][16],
!                                                       'read_result'           
                => $group['result'][1],
!                                                       'add_result'            
                => $group['result'][2],
!                                                       'edit_result'           
                => $group['result'][4],
!                                                       'delete_result'         
                => $group['result'][8],
!                                                       'manage_result'         
                => $group['result'][16],
!                                                       'initials'              
                        => $group['initials'],
!                                                       'lang_right'            
                => lang('right'),
!                                                       'lang_mask'             
                        => lang('mask'),
!                                                       'lang_result'           
                => lang('result'),
!                                                       'lang_read'             
                        => lang('Read'),                                //1
!                                                       'lang_add'              
                        => lang('Add'),                                 //2
!                                                       'lang_edit'             
                        => lang('Edit'),                                //4
!                                                       'lang_delete'           
                => lang('Delete'),                              //8
!                                                       'lang_manage'           
                => lang('Manage'),                              //16
!                                                       'lang_janitor'          
                => lang('Janitor'),                             //32
!                                                       'lang_supervisor'       
                => lang('Supervisor'),                  //64
!                                                       
'lang_budget_responsible'       => lang('Budget Responsible'),  //128
!                                                       'lang_initials'         
                => lang('Initials'),
!                                                       'type'                  
                        => 'groups'
!                                               );
!                                       }
                                }
  
+ 
                                address@hidden("_", $processed);
                        }
***************
*** 293,299 ****
  
  
!                               'lang_lid'                                      
=> lang('Username / Group'),
!                               'lang_lastname'                         => 
lang('Lastname'),
!                               'lang_firstname'                        => 
lang('Firstname'),
                                'lang_read'                                     
=> lang('Read'),                                //1
                                'lang_add'                                      
=> lang('Add'),                                 //2
--- 406,410 ----
  
  
!                               'lang_values'                           => 
lang('values'),
                                'lang_read'                                     
=> lang('Read'),                                //1
                                'lang_add'                                      
=> lang('Add'),                                 //2
***************
*** 319,322 ****
--- 430,438 ----
                        );
  
+                       if(!$this->location)
+                       {
+                               $receipt['error'][] = array('msg' => 
lang('select a location!'));
+                       }
+ 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
***************
*** 345,348 ****
--- 461,465 ----
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'cat_id'                                        
        => $this->cat_id,
+                               'permission'                                    
=> 1,
  
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
***************
*** 350,355 ****
                                'query'                                         
        => $this->query,
                                'lang_search'                                   
=> lang('search'),
!                               'table_header_acl2'                             
=> $table_header,
!                               'values_acl2'                                   
=> $content,
                                'lang_no_location'                              
=> lang('No location'),
                                'lang_location_statustext'              => 
lang('Select submodule'),
--- 467,478 ----
                                'query'                                         
        => $this->query,
                                'lang_search'                                   
=> lang('search'),
!                               'table_header_permission'               => 
$table_header,
!               //              'table_header_acl2'                             
=> $table_header,
!               //              'values_acl2'                                   
=> $content,
!                               'values_groups'                                 
=> $groups,
!                               'values_users'                                  
=> $users,
!                               'lang_groups'                                   
=> lang('groups'),
!                               'lang_users'                                    
=> lang('users'),
! 
                                'lang_no_location'                              
=> lang('No location'),
                                'lang_location_statustext'              => 
lang('Select submodule'),
***************
*** 362,366 ****
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_acl2' => $data));
                        $this->save_sessiondata();
                }
--- 485,489 ----
  
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_permission' => $data));
                        $this->save_sessiondata();
                }





reply via email to

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