Controlling access to application features using modules


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.

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.

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?