Last post May 05, 2005 07:38 AM by matchbx27
May 03, 2005 12:11 AM|leep2|LINK
If any given "action" control in a module can only have (essentialy) two SecurityLevels (View or Edit), and you can only restrict access by SecurityLevel (what Roles can View and what Roles can Edit), what is the point of being able to define multiple Security
Roles? If I have 5 "action" controls in my module, and I want users in Role-A to be able to access controls 1, 2, and 3, and I want users in Role-B to be able to access controls 2, 4, and 5, and I want users in Role-C to be able to access controls 3 and 4,
how can I do this?
May 05, 2005 07:38 AM|matchbx27|LINK
You would have to build this into your module. I can't think of any free modules that implement this type of functionally, but I've seen this functionally on modules I've purchased.
Example, the main module page may have a link button on the page. In the Module Settings, the Developer defined a dropdown box (of DNN Roles) that allows the admin to select which DNN Role has access to view this link.
In the code behind (in both the module and the edit control) you can pull the role stored in your module settings table and check to see if the current user is a member of this role, before displaying the link on the main module page or the edit control.
Your module settings table can be either the built-in table or a custom table. If you have lots of module settings you might want to use your own custom table.