Permissions to display pages

Hi

I have a dialog that I display from one of my project panels. I use a generalPage to define it because the dialog module doesn’t allow conditions.

I want to restrict access to only project admins but generalPage doesn’t support user_is_project_admin. This seems a bit silly because it does support the project type condition (so you can say only display this page for service desks projects but you can’t say display it for project admins).

I tried looking at using jiraProjectTabPanels but it displays it in the add-ons area (even if I add a location) which I don’t want.

Does anyone know of a workaround for this? If not can my add-on call a Jira REST API to find if a user has particular permissions. I see there is mypermissions but this won’t work because my app will be calling it as itself

Thanks
Paul

I found out that if you use a webPanel with a fake location you can validate against user_is_project_admin