Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  Module Visibility Question
Previous Previous
 
Next Next
New Post 6/4/2008 2:18 PM
Resolved
User is offline krenshau
24 posts
10th Ranked


Module Visibility Question 

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 3:13 PM
User is offline Chris Hammond
2965 posts
www.engagesoftware.com
5th Ranked








Re: Module Visibility Question 

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
Engage Software
St. Louis, MO
314.966.4000


The leading provider of DotNetNuke skinning, training and custom module development.
Official DotNetNuke® Training Provider
 
New Post 6/4/2008 4:21 PM
User is offline krenshau
24 posts
10th Ranked


Re: Module Visibility Question 

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 5:25 PM
User is offline Michael Washington
2848 posts
ADefWebserver.com
5th Ranked










Re: Module Visibility Question 

also see:

  • IActionable: Add Items to Your Module Menu (VB &C#)
  • NavigateURL: How to make a link (VB &C#)


  • Michael Washington
    * ADefWebserver.com
    * DNN Module Developer's Guide
    * IWEB - DNN Web Services
    * Silverlight and DotNetNuke
     
    New Post 6/5/2008 2:32 AM
    User is offline krenshau
    24 posts
    10th Ranked


    Re: Module Visibility Question 

    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 Previous
     
    Next Next
      Forum  General DotNetN...  Extend It! (Pro...  Module Visibility Question
     


    Forum Policy

    These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

    For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
    2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
    3. No Flaming or Trolling.
    4. No Profanity, Racism, or Prejudice.
    5. Site Moderators have the final word on approving/removing a thread or post or comment.
    6. English language posting only, please.

     


    DotNetNuke Training by Engage Software
    Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
    engagesoftware.com
    Smart-Thinker
    DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
    www.smart-thinker.com
    DNN Photo Gallery
    Complete Photo Gallery Management!
    www.dnnPhotoGallery.com

    DotNetNuke Corporation   Terms Of Use  Privacy Statement
    DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
    Hosted by MaximumASP