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.0delay after adding user to roledelay after adding user to role
Previous
 
Next
New Post
6/27/2007 10:21 AM
 

I have a module that after completing a form, the user is added to a role.  The code seems to be working, but there is a delay between when the user is added to the role and the time it takes affect.   After adding the role, i would like to redirect them to a page that only enable for members of that particular role, but I get an error message that the user doesn't have permission.  However, if i wait about a minute and refresh the screen he does have the permission.  I can also log out and and log back in and immediately have the permission.

I'm sure i'm missing something simple, clearing or reloading some variables, but I haven't been able to identify the right method.

Can someone point me in the correct direction?

 

 
New Post
6/27/2007 11:20 AM
 

As you have seen, Roles assignment will not be applied until the user logs out and back in.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
6/27/2007 11:56 AM
 

As i mentioned,  I'm not seeing that to be exactly true.  If i have a public role, and pages that are only accessible by that role,  i can subscribe under the member services pages,  wait about 1 minute and I have access, without logging out and back in. 

And if it were true, I should still be able to make the calls to the correct code to simulate re-logging in. 

I've tried these 2 routines but with no success.

 

 

 

DataCache.ClearUserCache(objUserInfo.PortalID, objUserInfo.Username)

 

UserController.UserLogin(PortalId, objUserInfo, PortalSettings.PortalName, Request.UserHostAddress,

False)

 

 
New Post
6/27/2007 12:38 PM
 

When the user logs out a cookie is deleted. The next time he signs in another one is created. This might be slightly related to why it works in the way I described.

As far as relogin the user vía code, I can only guess, but that wouldn't help you at all [:)]


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
7/6/2007 1:13 PM
 

I have run into this same issue.  Did anyone ever come up with a good fix?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0delay after adding user to roledelay after adding user to role


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