Solved

Dotnetnuke refresh menu items after role assignment

Posted on 2010-11-09
2
798 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
ErikVB earned 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

738 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