title: Allowing all users to impersonate any user in liferay
body: <p>I have a requirement where I have to allow all of my regular users to impersonate a user of their choice.</p>
  
  <p>I haven't been able to make this work. This is what I've done so far:</p>
  
  <ol>
  <li><p>Added the following properties to portal-ext.properties:</p>
  
  <pre><code>portal.jaas.enable=false
  portal.impersonation.enable=true
  </code></pre></li>
  <li><p>Created a role for the purposes of impersonation</p></li>
  <li>Defined permissions for this new role: Portal > Users and organizations > View &amp; Impersonate</li>
  <li>Assigned this role to a non-administrator user (user A)</li>
  </ol>
  
  <p>I don't need my users to see the list of users they can impersonate, I just want liferay to impersonate a user if <code>?doAsUserId=x</code> is present in the url (which does work if you are an administrator).</p>
  
  <p>When I try to impersonate user B using user A, nothing happens. I get this error in the tomcat log:</p>
  
  <pre><code>1ERROR [http-bio-8180-exec-85][PortalImpl:5990] User 80413 does not have the permission to impersonate 25105
  </code></pre>
  
  <p>(User 80413 is my User A, the one attempting to impersonate user B [25105])</p>
  
  <p>Am I missing something else?</p>