Changeset 7812 for sandbox/webservice/api/rest/core/LoginResource.php
- Timestamp:
- 01/30/13 17:05:57 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/rest/core/LoginResource.php
r6664 r7812 15 15 'contactApps' => $this->getUserApps() 16 16 ); 17 }18 19 private function getUserApps(){20 // Load Granted Apps for Web Service21 $config = parse_ini_file( __DIR__ . '/../../config/user.ini',true);22 $apps = $config['Applications.mapping'];23 24 // Load Granted Apps for User25 $contactApps = array();26 $acl = CreateObject('phpgwapi.acl');27 $user_id = $GLOBALS['phpgw_info']['user']['account_id']['acl'];28 foreach($acl->get_user_applications($user_id) as $app => $value){29 $enabledApp = array_search($app, $apps);30 if($enabledApp !== FALSE)31 $contactApps[] = $enabledApp;32 }33 34 return $contactApps;35 17 } 36 18
Note: See TracChangeset
for help on using the changeset viewer.