Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dotnetnuke refresh menu items after role assignment

Posted on 2010-11-09
2
Medium Priority
?
801 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 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

670 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