Foren

How does impersonate user work?

thumbnail
Cameron McBride, geändert vor 13 Jahren.

How does impersonate user work?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
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.
thumbnail
Hitoshi Ozawa, geändert vor 13 Jahren.

RE: How does impersonate user work?

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
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?
thumbnail
Cameron McBride, geändert vor 13 Jahren.

RE: How does impersonate user work?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
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.
thumbnail
Gaurav Jain, geändert vor 13 Jahren.

RE: How does impersonate user work?

Regular Member Beiträge: 145 Beitrittsdatum: 31.01.11 Neueste Beiträge
I can use it successfully.

I am running LR6.0.5 with tomcat bundle.
Running successfully on FF and Chrome.
thumbnail
Cameron McBride, geändert vor 13 Jahren.

RE: How does impersonate user work?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
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.
thumbnail
Sergio González, geändert vor 13 Jahren.

RE: How does impersonate user work?

Expert Beiträge: 301 Beitrittsdatum: 07.01.10 Neueste Beiträge
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,
thumbnail
Roger CARHUATOCTO, geändert vor 13 Jahren.

RE: How does impersonate user work?

Junior Member Beiträge: 32 Beitrittsdatum: 05.11.09 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: How does impersonate user work?

New Member Beiträge: 21 Beitrittsdatum: 31.10.11 Neueste Beiträge
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, geändert vor 10 Jahren.

RE: How does impersonate user work?

New Member Beiträge: 13 Beitrittsdatum: 13.02.13 Neueste Beiträge
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.