How to ensure only licensed Jira users can use my Connect app?

I’ve got a few tricks, but I want to make sure I’m doing this properly. I have an app that is valid on all Jira project types: Service Desk, Software, Core, (and maybe someday Product Discovery if they ever add pluggability).

What conditions will only show my app to licensed Jira users?

There is user_is_logged_in. Does that prevent customers from seeing it? They can be logged in too, though…

There is also can_use_application which requires me to specify a particular application, but if I specify Service Desk, does that let customers in, too? They can use Service Desk.

There is servicedesk.is_customer, which I could "invert": true, but if I try to use that on a page module, I get Installation failed. The app includes a Page module with an unsupported condition (servicedesk.is_customer).

Is there any set of conditions that would allow me to limit to licensed Jira users?

Unrelated/Meta: There is currently no category for Connect and I have to choose a category…

2 Likes

Hi @AdamAhmed!

I would think can_use_application is the way to go. As to how that condition applies to JSM customer uses, I’m not sure. Could you simply test it? :slight_smile:

If it doesn’t work, you could raise an ECOHELP to request support for the servicedesk.is_customer condition for Pages.

I have moved this thread to the JSM Cloud category, since that seems to be the closest fit.

I could test it and I’ve gotten advice from people who have that it seems to block customers when used (which sounds inaccurate for “can use application” in my mind, but ok).

…but it also feels wrong that it’s not clearly documented that it works that way. If it’s not documented and if Atlassians don’t even know how it should work, what guarantee do app vendors have that the behavior won’t change in the future? Especially given a customer obviously can use the app. But if the expected behavior is that customers return false for can_use_application, can you write that guarantee in the docs? I’d much rather have it in writing that it works that way than making it the responsibility of app vendors to guess and check.

Also given there is no JPD parameter for that condition, it sounds like it wouldn’t work for JPD-only users anyway. So it’s not actually a solution for what I want (until JPD is added as an option for that condition). A version that was not app-specific, like is_licensed_user would have been perfect.

I think the only solution I can rely on is via calling back to Jira to request applicationRoles for the calling user on every request (cached for a bit). Which I do. But that feels flimsy versus a declarative solution and also kinda inefficient and chatty. Having a fitting condition would have been nice to put on top too for peace of mind.

Created Atlassian Connect in Jira Cloud - Issues - Ecosystem Jira for a solution. Thanks for the suggestion!

1 Like