With UI Kit 2 we don’t use api.asUser or api.asApp anymore with requestJira.
My problem is that if my app calls
const res = await requestJira('/rest/api/3/role');
it tells a standard user that he doesn’t have the right permissions, because the /role API needs Jira administration rights.
How to make the call with the permissions of the app instead of the permissions of the user?
Thanks for your help!
Hi @BertrandDrouhard1, you can only make asUser() calls from the front-end. If you want to make asApp() calls you need to do so from a back-end resolver. This is one of the differences from UI Kit 1, now the UI Kit 2 runs client side.
Thank you Adam, I understand It is still not very clear for me what should be done on the back-end and what should be done on the front-end. I have to try to find a good tutorial on React apps architecture.
Yeah apologies, our user interface docs are a bit of a mess at the moment. UI Kit 2 will go GA soon and we’ll take the chance to simplify things a bit. Both UI frameworks will be client side, use the Forge bridge etc.