Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why does hasGlobalPermission not block access to a Forge page in the manifest?

Amine Nait Lechguer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 8, 2025 edited

I am developing a Forge app for Jira and trying to restrict access to certain pages using hasGlobalPermission in the manifest.yml.
My goal is to limit access to specific pages only to Jira administrators or some specific groups.

Here is how my manifest.yml is configured:

 

modules: 
  jira:globalPage:
     - key: myKey

     .....
     sections:
        - header: myHeader
        ...
pages:
...
displayConditions:
             hasGlobalPermission: ADMINISTER
....

 

I have created a test user who does not have the ADMINISTER permissions.
However, this user can still access the page, even though hasGlobalPermission is supposed to restrict their visibility.

I also tested retrieving permissions for this test user via the Jira API:

const response = await api
.asUser()
.requestJira(route`/rest/api/3/mypermissions?permissions=ADMINISTER`, {
headers: { Accept: "application/json" }
});

const data = await response.json();
console.log("🔹 Permissions:", data);

And the result confirms that the user does not have the permission (havePermission: false).

Questions:

1. Why does hasGlobalPermission not block access and visibility to the page?

2. Is there a better waqy to achieve this restriction based on permissions or specific groups?

 

Thank you fo you r help

1 answer

1 accepted

1 vote
Answer accepted
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2025

Hi @Amine Nait Lechguer 

In the Jira Forge Global Page documentation, it states, "You can only specify `pages` or `sections`, but not both." However, in your manifest, I see the pages listed under sections. Could this be the problem?

Please bear in mind that the Atlassian Developer Community is a better place to ask this sort of question as you may get more answers there.

Amine Nait Lechguer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2025 edited

Thank you for your answer, 
You can not specify sections and pages at the same level but a section can contain pages.

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2025

No problem! I'm glad it worked!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events