Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need help with new functionalityNeed help with new functionality
Previous
 
Next
New Post
8/23/2006 6:47 PM
 

I am trying to add code to turn off the display of a module for individual users in a particular role based on a list of modules that user has been granted access to. I am trying to achieve this by:  

Creating a table that contains the UserRoleid and the moduleid’s of the modules the user is given access. I added code to DotNetNuke.Security.PortalSecurity.HasNecessaryPermission function that runs when the ‘blnAthorized’ Boolean variable is set to true.  The new code for each role the user is assigned the modules the user is granted access is compared to the module passed to this function.  The only way this code will return true is if the module is in the list of modules otherwise the code returns false.   The module’s view access has only been granted to the role the user has been assigned and the user is only assigned to Registered Users, Subscribers and the role for the UserRoleID in the table described above.

We want this to work just like DNN does based on Roles for which a user is assigned.  I have been able to write code that returns false from the DotNetNuke.Security. PortalSecurity.HasNecessaryPermission function, with the functionality I have described. Even though this function returns false the module content is still being displayed. L

This functionality is need for a project that is going to use custom modules to imbed functionality from another web application. The module will contain aspx code that will access the other application as if it were part of the portal using an ascx.  These custom modules must function like the other application and a user will be granted access to these modules as I have described.  We need to remove the custom module functionality of DNN to make it work.

Why am I still getting a display in the custom module when I am getting a false returned from the HasNecessaryPermission function? Does it default to RegisteredUsers or Subscribers or something else that is preventing this from working? Are there any suggestions you might have or any ramifications to removing the DNN code that was created as a custom module?

 
New Post
8/23/2006 11:15 PM
 

I have a control panel replacement that will limit modules by role and a few other goodies in it. You can download it for free from my site. Source is included.

HTH's,

Dave

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need help with new functionalityNeed help with new functionality


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out