Impersonating another user within JIRA

This plugin allows an administrator to impersonate another user, i.e. to
become that user in jira, without knowing their password – which is often
impractical if authentication is handled by LDAP.

Impersonation is useful for administration of shared filters, shared
dashboards, double-checking a user has permission to do an action etc.

The implementation is surprising simple, so simple in fact that I doubt it
will work in all circumstances. So far I have only tested on Jira 3.12.2
and Jira 3.13, with the DefaultAuthenticator and also an SSO solution that we use.

Installation

Drop the jar file: jira-plugin-switchuser-09.jar in to WEB-INF/lib and restart.

Note: This is compiled with Java 5 so you must be using a Java 5 or above
JVM. If you are still on 1.4 consider upgrading or compile the source yourself.

Usage

In the Administration page, under “User, Groups & Roles” you should see a new
link “Switch User”. Further details are on that page.

5 comments to Impersonating another user within JIRA

  • Wait, you mean you just do this?
    JiraWebUtils.getHttpRequest().getSession().setAttribute(DefaultAuthenticator.LOGGED_IN_KEY, user);

    Stunned silence. Cool!

    Some minor gripes:

    It would be nice to be able to switch back from a user without admin permission, perhaps by storing the admin user id before changing and then providing a link for all users somewhere other than in the admin tab?

    The src jar file has no top-level directory in it, so unpacking it dumps everything into the current directory.

    Nice one.

    ~Matt

  • AM

    Jamie,

    I think this is the one of the most wanted feature at my company: to be able to setup individual dashboards with help from JIRA experts.

    Tried your plug-in with JIRA Enterprise 3.12.1-#299 – it works so far, but unfortunately it does not work for the portal or “Manage Portal”.

    Some details:
    1) installed
    2) loggon on as admin
    3) used to switch user to test-user, done.
    4) switch to home and reload -> still admin portal
    5) switched to “Manage Portal” -> still the list of admin’s dashboards
    5) did empty cache and reload -> still admin’s dashboard

    Any ideas ….? Anything I can do for you to help debugging?

    -AM-

  • Hello AM,

    I don’t really understand that, it works for me. Try putting a comment at http://confluence.atlassian.com/display/JIRAEXT/Jira+SU+Plugin – although that plugin is identical, Andy might be able to help.

    cheers, jamie

  • talla

    Hi Jamie,
    Iam also having the same problem.
    my jira version is 3.12.2 and using LDAP.
    1.I have installed switch User jar.
    2.login as admin user
    3. switch to test user.
    4.but it is showing admin dashbord instead of test user’s dashboard.
    5. if I configured any portlet in that it reflects to admin dashboard.
    6. only the login user is changed to test user but every thing in dashboard related to admin user only.

    please tell me is there any solution to switch to exactly test user dashboard.Do I need to change any code updations in the source.

    Thanks,
    Talla Mythreyi,

  • Talla – I can’t reproduce this at all. Can you put your comments at http://confluence.atlassian.com/display/JIRAEXT/Jira+SU+Plugin – looks like someone there has had a similar issue.

Leave a Reply