View Single Post
  #1  
Old 13th October 2011, 00:01
laptop_user laptop_user is offline
Member
 
Join Date: Aug 2011
Posts: 74
Thanks: 34
Thanked 7 Times in 7 Posts
Default Module permission question

Hello,

I have question with remote framework and module permission. Lets say I create a new page called User Details under Tools module.

I use remote framework and I hard coded everything to the page. I was wondering how could I check user permission. Is the example below actually sufficient?

Code:
// check permission
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');

//* Check permissions for module
$app->auth->check_module_permissions('tools');




// start soap
require('soap_config.php');

$client = new SoapClient(null, array('location' => $soap_location,
                      doing remote thing here             ....

I mean this thing is used for authentication?
Code:
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');

//* Check permissions for module
$app->auth->check_module_permissions('tools');
Is it sufficient enough to check whether user is login or not and everything?

Thanks in advance.
Reply With Quote
Sponsored Links