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.0Determine user page rights?Determine user page rights?
Previous
 
Next
New Post
1/29/2007 1:14 PM
 

I am currently developing a custom "menu builder" for use on my site so I can have more "granular" menus on the side or otherwise (still leave the main menu provider auto-generating menus). 

I would like my menu to be smart enough to omit pages from it's structure if the current user doesn't have view permissions (just like the base menu provider does).  Wondering how I can get a list of pages and their associated permissions for the currently logged in user.

In the meantime, I'll look through the source and see if i can find how the base menu does it, but hoping a post will come through to get me right there.

-- Fooberichu


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
1/29/2007 2:05 PM
 

You'll find the code in Navigation.vb.

Essentially you iterate through the PortalSettings.DesktopTabs collection, and check the TabPermissions.

        Private Shared Function IsTabShown(ByVal objTab As TabInfo, ByVal blnAdminMode As Boolean) As Boolean
            'if tab is visible, not deleted, not expired (or admin), and user has permission to see it...
            If objTab.IsVisible AndAlso objTab.IsDeleted = False AndAlso ((objTab.StartDate < Now AndAlso objTab.EndDate > Now) OrElse blnAdminMode) AndAlso PortalSecurity.IsInRoles(objTab.AuthorizedRoles) Then
                Return True
            Else
                Return False
            End If
        End Function


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
1/29/2007 2:22 PM
 

Thanks man.  This'll help a ton!

-- Fooberichu


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
3/2/2007 5:22 PM
 
I'm curious to know why is this NOT public function?
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Determine user page rights?Determine user page rights?


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