Problem with get users

Discuss about Group-Office development here

Moderator: Developers

MavisS2
Posts: 11
Joined: Thu Sep 12, 2013 12:17 pm

Problem with get users

Postby MavisS2 » Fri Nov 15, 2013 1:27 pm

HI,

I try get users list using GO_Base_Model_User model. Everything is ok, when i add premission to use module Addressbook and my module for user, but when i add premission only to my module for user, i have premission denied to get users list in my module.

Somebody could tell me in what way my module and addressbook was connected, and how i separate this.
mschering
Site Admin
Site Admin
Posts: 8332
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Problem with get users

Postby mschering » Fri Nov 15, 2013 4:25 pm

Can you share some code?
Best regards,

Merijn Schering
Intermesh
MavisS2
Posts: 11
Joined: Thu Sep 12, 2013 12:17 pm

Re: Problem with get users

Postby MavisS2 » Thu Nov 21, 2013 6:15 am

I have function in my controller actionUsers($params)

Code: Select all

protected function actionUsers($params) {                       
	$response['success'] = true;
	$usr = array(2,4,6,10);
	$store = new GO_Base_Data_Store($this->getStoreColumnModel());	
        $this->formatColumns($store->getColumnModel());
        $storeParams = $store->getDefaultParams($params)->criteria(GO_Base_Db_FindCriteria::newInstance()->addInCondition('id',$usr))->mergeWith($this->getStoreParams($params));
	$store->setStatement(call_user_func(array('GO_Base_Model_User','model'))->find($storeParams));

	$response = array_merge($response, $store->getData());
	return $response;
}
When i call this function and user does not have premission to addressbook, a have error end ajax request is canceled, but when i add premission to addresbook for user everything is ok.
mschering
Site Admin
Site Admin
Posts: 8332
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Problem with get users

Postby mschering » Thu Nov 21, 2013 10:06 am

Can you share what you do in format columns and post the exception stack trace too?
Best regards,

Merijn Schering
Intermesh

Who is online

Users browsing this forum: No registered users and 1 guest

cron