-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Forge - End User Consent
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
- Use the Log in as another user feature .
Expected Results
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- The Forge app encounters an error because there is a mismatch between the invoking account ID and the one in the FCT.
- view.getContext().license returns null/undefined during admin impersonation sessions for paid production Marketplace apps. Per List a Forge app on the Atlassian Marketplace, the license object should be present for paid apps in the production environment. This causes Forge apps that perform frontend license validation to incorrectly display "Invalid license" or block functionality for the impersonated user, even though the app is properly licensed on the site.
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.