As a site or org admin, I want to be able to use the apps when logged in as another user

XMLWordPrintable

      Issue Summary

      When logging in as another user via the https://support.atlassian.com/user-management/docs/log-in-as-another-user/ feature, Forge apps don’t work as expected. This has an impact on admins attempting to troubleshoot issues reported by their users and when testing.

      Steps to Reproduce

      1. Use the Log in as another user feature .

      Expected Results

      1. When an admin uses the "Log in as another user" feature available in Jira Premium to impersonate a normal user, all Forge app requests that utilize the request.asUser() method should execute in the context of the impersonated user.
      2. The /rest/api/3/myself endpoint, when called from a Forge app using request.asUser(), should return the details of the impersonated user (the user that the admin has logged in as), not the admin's user details.
      3. Forge apps should remain fully functional and behave exactly as they would if the impersonated user were logged in themselves, without any discrepancies in app behavior or data access.

      Actual Results

      1. When an admin impersonates a normal user using the "Log in as another user" feature in Jira Premium and interacts with the Forge app, the app's requests using request.asUser() method are not impersonating the user as intended.
      2. The /rest/api/3/myself endpoint, when called by the Forge app in the context of an impersonated session, still returns the details of the admin user (who initiated the impersonation) instead of the impersonated user's details.
      3. Due to the incorrect user context, Forge apps do not function as they would for the impersonated user, affecting admins' ability to troubleshoot and test from the perspective of normal users. 
      4. The Forge app encounters an error because there is a mismatch between the invoking account ID and the one in the FCT

      Workaround

      No workaround is available for site or org admins in a live site.

      When testing as an app developer, set up test accounts matching the different behaviour for different type of users and use those accounts for testing.

            Assignee:
            Unassigned
            Reporter:
            Sherica Ocbania
            Votes:
            20 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: