Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th October 2011, 01:01
laptop_user laptop_user is offline
Member
 
Join Date: Aug 2011
Posts: 96
Thanks: 42
Thanked 8 Times in 8 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
  #2  
Old 13th October 2011, 09:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,609 Times in 4,420 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
laptop_user (13th October 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix doesn't have Nolan Installation/Configuration 5 13th April 2011 06:00
Proftpd + MySQL virtual users, can't connect geekman HOWTO-Related Questions 28 27th September 2010 19:03
FreeRadius + MySQL working, but I don't know how to customise SQL queries awe Installation/Configuration 4 5th April 2010 00:28
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06


All times are GMT +2. The time now is 05:33.


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