HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Module permission question (http://www.howtoforge.com/forums/showthread.php?t=54513)

laptop_user 13th October 2011 00:01

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.

till 13th October 2011 08:43

Quote:

$app->auth->check_module_permissions('tools');
Yes. This command cecks if the user is logged in and has permission to access the tools module. But thats not related to the remote api, these checks are ispconfig interface functions.


All times are GMT +2. The time now is 03:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.