Solved

Dotnetnuke refresh menu items after role assignment

Posted on 2010-11-09
2
799 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The viewer will learn how to dynamically set the form action using jQuery.

691 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