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.1,1.2 class.bo


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.1,1.2 class.boadmin.inc.php,1.2,1.3 class.bocommon.inc.php,1.23,1.24 class.soinvoice.inc.php,1.14,1.15 class.uiadmin.inc.php,1.3,1.4 class.uiinvoice.inc.php,1.13,1.14
Date: Sat, 08 Mar 2003 17:23:42 -0500

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

Modified Files:
        class.acl2.inc.php class.boadmin.inc.php 
        class.bocommon.inc.php class.soinvoice.inc.php 
        class.uiadmin.inc.php class.uiinvoice.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.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.acl2.inc.php  8 Mar 2003 16:54:31 -0000       1.1
--- class.acl2.inc.php  8 Mar 2003 22:23:15 -0000       1.2
***************
*** 21,30 ****
                function acl2()
                {
!                       $expected_args[0] = 
Array('name'=>'account_id','default'=>$GLOBALS['phpgw_info']['user']['userid'], 
'type'=>'number');
                        $expected_args[1] = 
Array('name'=>'host_id','default'=>0, 'type'=>'number');
                        $expected_args[2] = 
Array('name'=>'app_id','default'=>$GLOBALS['phpgw']->applications->data[$GLOBALS['phpgw_info']['flags']['currentapp']]['id'],
 'type'=>'number');
                        $recieved_args = func_get_args();
                        $args = safe_args($expected_args, 
$recieved_args,__LINE__,__FILE__);
! 
                        $this->db = $GLOBALS['phpgw']->db;
                        $this->account_id = $args['account_id'];
--- 21,30 ----
                function acl2()
                {
!                       $expected_args[0] = 
Array('name'=>'account_id','default'=>$GLOBALS['phpgw_info']['user']['account_id'],
 'type'=>'number');
                        $expected_args[1] = 
Array('name'=>'host_id','default'=>0, 'type'=>'number');
                        $expected_args[2] = 
Array('name'=>'app_id','default'=>$GLOBALS['phpgw']->applications->data[$GLOBALS['phpgw_info']['flags']['currentapp']]['id'],
 'type'=>'number');
                        $recieved_args = func_get_args();
                        $args = safe_args($expected_args, 
$recieved_args,__LINE__,__FILE__);
! //_debug_array($args);
                        $this->db = $GLOBALS['phpgw']->db;
                        $this->account_id = $args['account_id'];

Index: class.boadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boadmin.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.boadmin.inc.php       8 Mar 2003 16:51:15 -0000       1.2
--- class.boadmin.inc.php       8 Mar 2003 22:23:15 -0000       1.3
***************
*** 21,26 ****
                        $this->so                       = 
CreateObject($this->currentapp.'.soadmin');
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
!                       $this->acl2             = 
CreateObject($this->currentapp.'.acl2',1,'##DEFAULT##');
!                       $this->right            = array(1,2,4,8,16,32);
  
                        if ($session)
--- 21,26 ----
                        $this->so                       = 
CreateObject($this->currentapp.'.soadmin');
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
!                       $this->acl2             = 
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
!                       $this->right            = array(1,2,4,8,16,32,64,128);
  
                        if ($session)

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.bocommon.inc.php      5 Mar 2003 14:31:49 -0000       1.23
--- class.bocommon.inc.php      8 Mar 2003 22:23:15 -0000       1.24
***************
*** 51,54 ****
--- 51,55 ----
                        $this->socommon                 = 
CreateObject($this->currentapp.'.socommon',True);
                        $this->accounts                 = 
CreateObject('phpgwapi.accounts');
+                       $this->acl2                     = 
CreateObject($this->currentapp.'.acl2');
  
                        $this->part_of_town_id  = 
get_var('part_of_town_id',array('POST','GET'));
***************
*** 112,123 ****
                        }
  
- 
-                       $admins = 
$GLOBALS['phpgw']->session->appsession('admins',$this->currentapp);
-                       $module_order = 
$GLOBALS['phpgw']->session->appsession('module_order',$this->currentapp);
- 
-                       
$this->admin_equipment=$admins[$module_order['equipment']]['equipment']['admin'];
-                       
$this->admin_workorder=$admins[$module_order['workorder']]['workorder']['admin'];
-                       
$this->admin_pricebook=$admins[$module_order['pricebook']]['pricebook']['admin'];
-                       
$this->admin_invoice=$admins[$module_order['invoice']]['invoice']['admin'];
                }
  
--- 113,116 ----
***************
*** 445,452 ****
                        $currentapp=$this->currentapp;
  
-                       //$sub='property';
- 
- //                    _debug_array($admins);
- 
                        if (!$sub)
                        {
--- 438,441 ----
***************
*** 484,488 ****
                                
$menu['sublink_equipment']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index');
                                $menu['sublang_equipment']=lang('Equipment');
!                               if ($this->admin_equipment)
                                {
                                        
$menu['sublink_equipment_type']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uistandard_entity.index&type=equipment');
--- 473,477 ----
                                
$menu['sublink_equipment']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index');
                                $menu['sublang_equipment']=lang('Equipment');
!                               if ($this->acl2->check('.equipment',16))
                                {
                                        
$menu['sublink_equipment_type']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uistandard_entity.index&type=equipment');
***************
*** 546,550 ****
  //                            $menu['sublang_invoice_powermeter']=lang('Power 
meter');
                                
$menu['sublang_invoice_consume']=lang('consume');
!                               if ($this->admin_invoice)
                                {
                                        
$menu['sub_invoice_investment_value']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvestment.index');
--- 535,539 ----
  //                            $menu['sublang_invoice_powermeter']=lang('Power 
meter');
                                
$menu['sublang_invoice_consume']=lang('consume');
!                               if ($this->acl2->check('.invoice',16))
                                {
                                        
$menu['sub_invoice_investment_value']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvestment.index');
***************
*** 579,583 ****
                                $menu['sublang_invoice_export']='';
                        }
!                       if ($sub == pricebook && $this->admin_pricebook)
                        {
                                $menu['sublang_vendor_activities']=lang('Per 
Vendor');
--- 568,572 ----
                                $menu['sublang_invoice_export']='';
                        }
!                       if ($sub == pricebook && 
$this->acl2->check('.pricebook',16))
                        {
                                $menu['sublang_vendor_activities']=lang('Per 
Vendor');
***************
*** 611,615 ****
                                
$menu['sublang_workorder_archive']=lang('Archive');
                                
$menu['sublang_workorder_template']=lang('Workorder template');
!                               if($this->admin_workorder)
                                {
                                        
$menu['sub_workorder_event']=$GLOBALS['phpgw']->link('/property/list_event.php','sub=workorder');
--- 600,604 ----
                                
$menu['sublang_workorder_archive']=lang('Archive');
                                
$menu['sublang_workorder_template']=lang('Workorder template');
!                               if($this->acl2->check('.workorder',16))
                                {
                                        
$menu['sub_workorder_event']=$GLOBALS['phpgw']->link('/property/list_event.php','sub=workorder');

Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.soinvoice.inc.php     25 Feb 2003 11:29:29 -0000      1.14
--- class.soinvoice.inc.php     8 Mar 2003 22:23:15 -0000       1.15
***************
*** 26,30 ****
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
!                       $this->account_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 26,31 ----
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
!                       $this->account_id       = 
$GLOBALS['phpgw_info']['user']['account_id'];
!                       $this->acl2             = 
CreateObject($this->currentapp.'.acl2');
  
                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
***************
*** 632,652 ****
                }
  
- 
                function check_role()
                {
! 
!                       $user_id = $GLOBALS['phpgw_info']['user']['account_id'];
! 
!                       $this->db->query(" SELECT * from fm_admin  where 
sub_module='invoice' and account_id= '$user_id'");
!                       $this->db->next_record();
!                       $role=array(
!                               'is_janitor'                            => 
$this->db->f('janitor'),
!                               'is_supervisor'                         => 
$this->db->f('supervisor'),
!                               'is_budget_responsible'         => 
$this->db->f('budget_responsible'),
!                               'is_transfer'                           => 
$this->db->f('transfer')
!                               );
! 
!                       return $role;
! 
                }
  
--- 633,648 ----
                }
  
                function check_role()
                {
!                       if(!$this->role)
!                       {
!                               $this->role=array(
!                                       'is_janitor'                            
=> $this->acl2->check('.invoice',32),
!                                       'is_supervisor'                         
=> $this->acl2->check('.invoice',64),
!                                       'is_budget_responsible'         => 
$this->acl2->check('.invoice',128),
!                                       'is_transfer'                           
=> $this->acl2->check('.invoice',16)
!                                       );
!                       }
!                       return $this->role;
                }
  

Index: class.uiadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uiadmin.inc.php       8 Mar 2003 16:51:15 -0000       1.3
--- class.uiadmin.inc.php       8 Mar 2003 22:23:15 -0000       1.4
***************
*** 129,141 ****
                                        $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]
                                        );
                                }
--- 129,144 ----
                                        $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]
                                        );
                                }
***************
*** 176,188 ****
  
  
!                               'lang_lid'                      => 
lang('Username / Group'),
!                               'lang_lastname'         => lang('Lastname'),
!                               'lang_firstname'        => lang('Firstname'),
!                               'lang_read'                     => 
lang('Read'),                //1
!                               'lang_add'                      => lang('Add'), 
                //2
!                               'lang_edit'                     => 
lang('Edit'),                //4
!                               'lang_delete'           => lang('Delete'),      
        //8
!                               'lang_manager'          => lang('Manager')      
        //16
! 
                        );
  
--- 179,193 ----
  
  
!                               'lang_lid'                                      
=> lang('Username / Group'),
!                               'lang_lastname'                         => 
lang('Lastname'),
!                               'lang_firstname'                        => 
lang('Firstname'),
!                               'lang_read'                                     
=> lang('Read'),                                //1
!                               'lang_add'                                      
=> lang('Add'),                                 //2
!                               'lang_edit'                                     
=> lang('Edit'),                                //4
!                               'lang_delete'                           => 
lang('Delete'),                              //8
!                               'lang_manager'                          => 
lang('Manager'),                             //16
!                               'lang_janitor'                          => 
lang('Janitor'),                             //32
!                               'lang_supervisor'                       => 
lang('Supervisor'),                  //64
!                               'lang_budget_responsible'       => lang('Budget 
Responsible')   //128
                        );
  
***************
*** 201,204 ****
--- 206,210 ----
                                'message'                                       
        => $message,
                                'processed'                                     
        => $processed,
+                               'location'                                      
        => $this->location,
                                'links'                                         
        => $links,
                                'allow_allrows'                                 
=> false,

Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.uiinvoice.inc.php     28 Feb 2003 19:39:00 -0000      1.13
--- class.uiinvoice.inc.php     8 Mar 2003 22:23:15 -0000       1.14
***************
*** 32,37 ****
                {
                        $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->cats                                     = 
CreateObject('phpgwapi.categories');
-                       $this->cats->app_name           = 'building';
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
--- 32,35 ----
***************
*** 51,55 ****
--- 49,67 ----
                        $this->allrows                          = 
$this->bo->allrows;
  
+                       $this->acl2                     = 
CreateObject($this->currentapp.'.acl2');
+ 
                        
$GLOBALS['phpgw']->session->appsession('sub',$this->currentapp,'invoice');
+ 
+ 
+ /*                    if(!$this->acl2->check('.invoice',1) && 
!$this->acl2->check('.invoice',2) && !$this->acl2->check('.invoice',4) && 
!$this->acl2->check('.invoice',8) && !$this->acl2->check('.invoice',16) )
+                       {
+                               define('PHPGW_FOOTER_RAN',True);
+ 
+                               echo '<br>You lack sufficient rights to enter 
this section<br>';
+ 
+                               
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/home.php'));
+                       }
+ */
+ 
                }
  





reply via email to

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