Yii Framework Forum: Controlling access to application features using modules - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Controlling access to application features using modules Controlling access to modules using GUI control panel Rate Topic: -----

#1 User is offline   studentofyii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 16-April 12
  • Location:Toronto, Canada

Posted 06 July 2012 - 08:20 PM

Hello,

As part of my application, I'd like to build a GUI control panel that can enable or disable certain application features. I'm not sure how to start and was looking for some ideas. Basically if some features of the application are free then the user can turn them on/off at will. If they are paid features then they can only be turned on if the users have paid for the feature.

The way I thought to structure this was by using modules and nested modules to control the functionality and providing a GUI control panel to the user to enable/disable features (i.e modules).

Is this the right approach and how would I go about building a control panel/logic to control access? I'd appreciate some brainstorming with some forum members.

If there is already an extension I would appreciate if you can point me to it.

Thanks for your help.
0

#2 User is offline   studentofyii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 16-April 12
  • Location:Toronto, Canada

Posted 08 July 2012 - 08:47 PM

I would appreciate if someone could provide some suggestions to point me in the right direction.

My end goal is to build a GUI interface controlled by the user to enable and disable features of the application. If some features are paid features then the user won't be able to enable until he has purchased the feature.

Thanks for any help.
0

#3 User is offline   NickNiebaum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 25-June 12

Posted 08 July 2012 - 11:49 PM

Look into RBAC - there's references to it all over the board, and info about it in the wiki.
0

#4 User is offline   studentofyii 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 16-April 12
  • Location:Toronto, Canada

Posted 10 July 2012 - 07:05 AM

View PostNickNiebaum, on 08 July 2012 - 11:49 PM, said:

Look into RBAC - there's references to it all over the board, and info about it in the wiki.


Thanks Nick for your reply. Is RBAC the way to go for controlling access to whole modules? I'm actually planning to use RBAC as well for role based authorization. I'm not sure how I would implement RBAC for access to modules like I'm trying to do.

Again, what I'm trying to do is control access to application modules and sub modules depending if the user has enabled a feature (or paid for some features). Based on some analysis the approach I'm currently considering is the following:

1-extending CWebApplication to check a database table that stores whether a module is enabled/disabled for a particular account
2-extending CController and using access control filters to control access to modules via the configuration in step 1 (by extending CController this logic would apply across all controllers)
3-using the visible parameter in CMenu items to enable/disable navigation to application modules via configuration in step 1

Does this approach look right or am I out to lunch?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users