Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dotnetnuke refresh menu items after role assignment

Posted on 2010-11-09
2
Medium Priority
?
803 Views
Last Modified: 2012-05-10
Dear experts,

I have created a dotnetnuke module for users to add themselves to a security role "Document Editing". I have assigned the menu item "Documents" to the security role.

However, the menu item "Documents" does not appear immediately when the user add themselves to the role. It only appears after about a minute.

How can I force the menu items to appear immediately? I am not sure whether this should be a server-side or client-side issue. Tried using javascript postback but with no luck.

Thanks!
0
Comment
Question by:quziguang
2 Comments
 
LVL 6

Accepted Solution

by:
ErikVB earned 2000 total points
ID: 34099854
In DNN rolemembership are persisted on the client side by way of cookies. So, if you modify role membership of a user, you need to clear that cookie. You can do this easily by calling DotNetNuke.Security.PortalSecurity.ClearRoles()
Once the cookie is cleared, DNN will re-create it with the new roleinfo, which includes the new membership. This will make the menu filter properly to the new rolemembership of the user, and should make the previously hidden menu visible
0
 

Author Comment

by:quziguang
ID: 34105132
Thanks - that was really helpful!
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question