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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Module Visibility QuestionModule Visibility Question
Previous
 
Next
New Post
6/4/2008 4:18 PM
 

Hello,

I am creating a module, and I am not very experienced at it, but I seem to understand it except for one aspect.

When I am creating the module, do I need to control the module visibility by checking if the user is in a role, or is that handled by the PortalModuleBase?

If I am supposed to manage that, what is the best practice for that, and where can I find a sample? Some tutorials hard code checking for admin, but that seems counter to the way DNN allows the admin or host to specify visibility based on role. Other tutorials don't handle it at all. That leaves me asking, "What is the right way?"

Thank you for your help.

Ben

 
New Post
6/4/2008 5:13 PM
 

You can control it yourself if you wish, or you can just let DNN handle it either through page or module level permissions.

If you want to check a role for yourself you can use DotNetNuke.Security.PortalSecurity.IsInRole or IsInRoles

passing in a string of roles, or a single role.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
6/4/2008 6:21 PM
 

Thank you very much for your reply.

For clarification, if I do nothing in my module it will still have the default permission verification that comes with the "built in" modules, correct?

Ben

 
New Post
6/4/2008 7:25 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
6/5/2008 4:32 AM
 

Thank you for that information. That is a very good resource. That site has helped me a lot. However, maybe I am a little dense in this situation. This statement from the site says, "The Portal administrator will ultimately decide which users actually have access to the control." This implies that I don't need to control view permissions in the module ( I am referring to the view control, not the link to the edit control). Is it safe for me to assume that what I am inferring from that statement is correct?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Module Visibility QuestionModule Visibility Question


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