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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationProblem with roles and 2 different sessions on the same portalProblem with roles and 2 different sessions on the same portal
Previous
 
Next
New Post
3/18/2009 1:09 PM
 

Hi,

My problem is the following :

I have two tabs in my portal : "page1" only visible to role "role1" ,and "page2" only to "role2".

Saying we have also two users : "user1" belonging to "role1" and "user2" belonging to "role2".

Now if I open a new window and log in as "user1" > everything is ok, I can only access "page1".

Then I leave the first window opened, and I open another new window and log in as "user2" > ok, only "page2" in the menu, great.

Now if I come back to the first window and refresh it, I am still logged in as "user1" BUT the only page I see is "page2", which apparently means that both windows work with the same role's context.

So I am asking you the question : what could I do to avoid this, and work in two separate windows with two separate roles contexts ?

I am using 04.09.00 version and the default authentication provider ("DNN").

Thanks in advance for your help. I spent the day on it but for now I am stuck... :(

 

 
New Post
3/18/2009 2:38 PM
 

Long story short: you can't.  The first window should not have showed you as being user1.  Come to think of it, how did you login as user2 in window 2?  You should have had to logout and then log back in, meaning your session from windows 1 was reset.

The way I work around this is to use some combination of browsers to achieve the different users.  Since browser targeting generally requires me to have 4 and 5 browsers installed at any given time (right now, I have Firefox 3.1 beta 3, Firefox 3.0.7, Opera 9.64, Opera 10 alpha, Chrome, IE8RC1, and Safari 4 installed), I just open up a different browser and login as my test users.

For example: right now I'm working on an extranet site with 2 levels of membership - plus a host.  So, I have Chrome logged in as the highest level, IE as the second level, and am using Firefox for myself (I'm a host level user).  I keep them straight by putting this nifty piece of code in an HTML module which appears on each page (check "Replace tokens" on the module settings):  < p style="text-align: left;" >Welcome [ User:DisplayName ] ([ User:Username ]).< /p >.  When I'm out of development, I'll leave that on the main page only.

I hope this helps.

 
New Post
3/19/2009 6:29 AM
 

Thanks for your answer dmeiser.

The workaround of multiple browser can't do the job unfortunately. In fact the goal of my project is to have a main window logged in as "manager" for instance, have a list of users, and click on an item to open a new window (same kind of browser of course...) logged in as this user ; keeping my main "manager" window in the background.

To achieve this my first test was the one I described in the first email of the thread. And I still can't believe this can't be done.

What I found really strange is that I really have 2 different users logged in 2 separate windows, unfortunately sharing the same f... roles.

 

 
New Post
3/19/2009 9:18 AM
 

I tried to investigate with the excellent Fiddler 2, and here is what I found.

Using the Custom rules functionality, I remove the "portalroles" part in the Cookie before request, which makes things work exactly like I wanted (again : 2 seperate windows on the same portal, logged in as 2 different users form 2 different roles).

So I know now that if I code an httphandler to do this before request I will have my 2 users browsing separately.

However I still want to understand what "portalroles" cookie part does ? Will I have unwanted side effects if I remove it ?

Mike ? Gurus :P ?

Thanks again for your help

 
New Post
3/19/2009 10:02 AM
 

I don't know...  You're attempting to do something with DNN that i was never designed to do.  The way I understand it is that the cookies are there to keep logged in and with the correct permissions.  If you modify the cookies, my guess is that you'll lose the security distinctions after a few page changes.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationProblem with roles and 2 different sessions on the same portalProblem with roles and 2 different sessions on the same portal


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