Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Cameron McBride
How does impersonate user work?
February 8, 2011 10:01 AM
Answer

Cameron McBride

Rank: Expert

Posts: 273

Join Date: February 8, 2011

Recent Posts

I am signed into the portal as the administrator.

In the control panel I do the following:
1. Pick users on the left
2. Click actions next to the user I want to impersonate
3. Click impersonate
4. A new window opens, I am still at the Users screen in the control panel
5. The bar at the top still shows my administrator as logged in
6. The username in the control panel shows the admin account as well

I don't feel like the impersonate is working at all.

Liferay 6.0.5.
Hitoshi Ozawa
RE: How does impersonate user work?
February 8, 2011 5:06 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Which bundle and which web browser are you using?
I'm using the Tomcat bundle now with Firefox, and the new windows pops up with the selected users's account.

Are you getting any messages in the console panel?
Cameron McBride
RE: How does impersonate user work?
February 9, 2011 6:03 AM
Answer

Cameron McBride

Rank: Expert

Posts: 273

Join Date: February 8, 2011

Recent Posts

Tomcat Bundle, running locally on a Server 2008 (not as a service yet).

I have tried it in three browsers:

- IE7: This is our company standard (>180,000 users). Impersonate opens in a new window (not a tab) and the users name in the top right is still mine.

- IE8: The Server 2008 has IE8 on it so I tried it there. Same results as IE7.

- Chrome: When using impersonate in chrome it opens in a tab and not a totally separate window. Same problem as with the other browsers.

No messages are coming out in the tomcat dos box window. No messages in the catalina log file.

I also tried creating a new role with the impersonate permission and adding it to my users account, which also has the administrator role. This made no difference.
Gaurav Jain
RE: How does impersonate user work?
February 10, 2011 2:39 AM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 141

Join Date: January 31, 2011

Recent Posts

I can use it successfully.

I am running LR6.0.5 with tomcat bundle.
Running successfully on FF and Chrome.
Cameron McBride
RE: How does impersonate user work?
February 10, 2011 11:37 AM
Answer

Cameron McBride

Rank: Expert

Posts: 273

Join Date: February 8, 2011

Recent Posts

I just tried with Firefox and get the same problem.

Is there some entry I need to make in my portal-ext.properties file that gets this feature to work?
Is there some additional logging that I can turn on that might help with figuring out the cause?

Our users coming from Active Directory if that makes any difference.
Sergio González
RE: How does impersonate user work?
February 14, 2011 7:08 AM
Answer

Sergio González

LIFERAY STAFF

Rank: Expert

Posts: 274

Join Date: January 7, 2010

Recent Posts

There are a few properties that must be set so "impersonate" works in the system (although they are the default values, so if you didn't change them it should work):

portal.jaas.enable=false
portal.impersonation.enable=true

You should also check in the URL if there is a new param added such as doAsUserId={userId impersonated}

Regards,
Roger CARHUATOCTO
RE: How does impersonate user work?
February 26, 2011 4:52 AM
Answer

Roger CARHUATOCTO

Rank: Junior Member

Posts: 32

Join Date: November 5, 2009

Recent Posts

Have you changed the Liferay context to a non ROOT?
Impersonation does not build URL correctly, add *manually* the new context to URL, for example:

http://lfry:8080/${new_ctx}/web/guest?doAsUserId =${usr_id}


another option would be:

1. as admin, go to control panel > portal > settings > general and update Home URL with: /${new_ctx}/web/guest
2. you have to log in always from http://lfry:8080/${new_ctx}/web/guest and not from http://lfry:8080/${new_ctx}

Tested with liferay 6.0.5 ce
Jason Allen
RE: How does impersonate user work?
December 7, 2011 8:03 AM
Answer

Jason Allen

Rank: New Member

Posts: 16

Join Date: October 31, 2011

Recent Posts

Cameron McBride:
I am signed into the portal as the administrator.

In the control panel I do the following:
1. Pick users on the left
2. Click actions next to the user I want to impersonate
3. Click impersonate
4. A new window opens, I am still at the Users screen in the control panel
5. The bar at the top still shows my administrator as logged in
6. The username in the control panel shows the admin account as well

I don't feel like the impersonate is working at all.

Liferay 6.0.5.



Did you ever get this resolved by the way? I'm experiencing the same issue in Liferay 6.0.4 CE. All browsers behave just as you describe and I've tried all the solutions given here. I am not running in a non-root context and have checked the properties etc. to no avail.
Dharmen Panchal
RE: How does impersonate user work?
May 23, 2013 8:02 AM
Answer

Dharmen Panchal

Rank: New Member

Posts: 13

Join Date: February 13, 2013

Recent Posts

Hi Jason Allen,

When you impersonate a user, Liferay will open the Home page (ontrol panel > portal > settings > general : Home URL) with ?doAsUserId =${userId} appended to the URL.

Make sure the Home URL specified in the control panel is available.
Please apply the patches for you Liferay version (If you are using EE version).

Hope that helps.

Thanks,
Dharmen Panchal.