Changeset 1508


Ignore:
Timestamp:
10/13/09 09:28:14 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Arrumando permissões de usuários para usuários

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/class.uifilemanager.inc.php

    r1506 r1508  
    339339 
    340340                        # Get their readable groups to be used throughout the script 
     341                        $acl = array(); 
    341342                        $groups = array(); 
    342  
    343                         $groups = $GLOBALS['phpgw']->accounts->get_list('groups'); 
    344  
     343                        $acl = $GLOBALS['phpgw']->acl->get_ids_for_location('1012',1,'filemanager'); 
     344                        if (is_array($acl)) 
     345                                foreach($acl as $key => $value){ 
     346                                        $info = array(); 
     347                                        $info = $GLOBALS['phpgw']->accounts->get_account_data($value); 
     348                                        $groups[$key]['account_id'] = $value; 
     349                                        $groups[$key]['account_lid'] = $info[$value]['lid']; 
     350                                        $groups[$key]['account_name'] = $info[$value]['firstname']; 
     351                                        $groups[$key]['account_lastname'] = $info[$value]['lastname']; 
     352                                        $groups[$key]['account_fullname'] = $info[$value]['fullname']; 
     353                                } 
    345354                        $this->readable_groups = array(); 
    346355 
    347356                        while(list($num, $account) = each($groups)) 
    348357                        { 
    349                                 if($this->bo->vfs->acl_check(array('owner_id' => $account['account_id'],        'operation' => PHPGW_ACL_READ))) 
     358//                              if($this->bo->vfs->acl_check(array('owner_id' => $account['account_id'],'operation' => PHPGW_ACL_READ))) 
    350359                                { 
    351360                                        $this->readable_groups[$account['account_lid']] = Array('account_id' => $account['account_id'], 'account_name' => $account['account_lid']); 
     
    353362                        } 
    354363 
     364 
    355365                        $this->groups_applications = array(); 
    356366 
    357                         while(list($num, $group_array) = each($this->readable_groups)) 
    358                         { 
    359                                 $group_id = $GLOBALS['phpgw']->accounts->name2id($group_array['account_name']); 
    360  
    361                                 $applications = CreateObject('phpgwapi.applications', $group_id); 
    362                                 $this->groups_applications[$group_array['account_name']] = $applications->read_account_specific(); 
     367                        foreach ($this->readable_groups as $value) 
     368                        { 
     369                                $applications = CreateObject('phpgwapi.applications', $value['account_id']); 
     370                                $this->groups_applications[$value['account_name']] = $applications->read_account_specific(); 
    363371                        } 
    364372 
     
    911919                                { 
    912920                                        # If the group doesn't have access to this app, we don't show it 
    913                                         if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled']) 
     921                                        /*if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled']) 
    914922                                        { 
    915923                                                continue; 
    916924                                        } 
     925                                        */ 
    917926 
    918927 
Note: See TracChangeset for help on using the changeset viewer.