<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Impersonate user  option in action button</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113047996" />
  <subtitle>Impersonate user  option in action button</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113047996</id>
  <updated>2026-04-04T12:38:57Z</updated>
  <dc:date>2026-04-04T12:38:57Z</dc:date>
  <entry>
    <title>RE: Impersonate user  option in action button</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113177078" />
    <author>
      <name>Vivek Mehta</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113177078</id>
    <updated>2019-04-12T05:44:58Z</updated>
    <published>2019-04-12T05:44:58Z</published>
    <summary type="html">Thanks christopher for your time. First i also did that using copy paste only and that works fine.But i wanted that thing to happen itself(i.e: doAsuserid should come itself attached to the url).</summary>
    <dc:creator>Vivek Mehta</dc:creator>
    <dc:date>2019-04-12T05:44:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Impersonate user  option in action button</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113064019" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113064019</id>
    <updated>2019-04-08T14:07:15Z</updated>
    <published>2019-04-08T14:07:15Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Just to add to what Christoph is saying -- if you are creating &amp;lt;portlet:actionURL/&amp;gt;'s in your view, you could also swap those out to use the ext taglib version that Liferay provides, changing the tag to &amp;lt;liferay-portlet:actionURL/&amp;gt;. If you do that, then you can use attributes on the tag to impersonate either the group or the user.​​​​​​​&lt;br&gt;​​​​​​​&lt;pre&gt;&lt;code&gt;&amp;lt;attribute&amp;gt;
   &amp;lt;name&amp;gt;doAsGroupId&amp;lt;/name&amp;gt;
   &amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;
   &amp;lt;rtexprvalue&amp;gt;true&amp;lt;/rtexprvalue&amp;gt;
&amp;lt;/attribute&amp;gt;
&amp;lt;attribute&amp;gt;
   &amp;lt;name&amp;gt;doAsUserId&amp;lt;/name&amp;gt;
   &amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;
   &amp;lt;rtexprvalue&amp;gt;true&amp;lt;/rtexprvalue&amp;gt;
&amp;lt;/attribute&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-08T14:07:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: Impersonate user  option in action button</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113048680" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113048680</id>
    <updated>2019-04-07T19:19:44Z</updated>
    <published>2019-04-07T19:19:44Z</published>
    <summary type="html">When you impersonate a user, Liferay adds a &amp;#34;?doAsUserId=&amp;lt;TOKEN&amp;gt;&amp;#34; parameter to the url. When you click somewhere, that parameter is probably lost. In your case, you can:&lt;br /&gt;&lt;br /&gt;a) Copy that parameter and add it yourself again, when it is lost (inconvenient, but it might work)&lt;br /&gt;b) I guess, you or some contractor did some customizing. Whoever did that, has to make sure that that parameter is always attached to all urls.&lt;br /&gt;&lt;br /&gt;Option a) is probably sufficient, if you just want to check something. Option b) requires some work and probably some changes/fixes on your theme or applications.</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-04-07T19:19:44Z</dc:date>
  </entry>
  <entry>
    <title>Impersonate user  option in action button</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113047995" />
    <author>
      <name>Vivek Mehta</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113047995</id>
    <updated>2019-04-07T18:25:48Z</updated>
    <published>2019-04-07T18:25:48Z</published>
    <summary type="html">When i am impersonating a user , it works fine for the home page . But then when i click on something or redirects my page to another page then the view is changed to original user perspective. I want to view all the process as impersonate user . Please someone help.</summary>
    <dc:creator>Vivek Mehta</dc:creator>
    <dc:date>2019-04-07T18:25:48Z</dc:date>
  </entry>
</feed>
