Hi Experts,
I want to show my page(My Report) only to jira admin or project admin. How can I achieve this using conditions in module ?
Now it is only visible to site admin.
My atlassian-connect.json file:
{
"scopes": ["ADMIN","ACT_AS_USER"],
"modules": {
"generalPages": [
{
"location": "system.top.navigation.bar",
"weight": 50,
"name": {
"value": "My Report"
},
"key": "index-page",
"url": "/index",
"conditions": [
{
"condition": "user_is_admin"
}
],
"icon": {
"width": 30,
"height": 30,
"url": "/img/xx-xxx.png"
}
}
]
},
}
@danielwester @epehrson
Did you try to add conditions user_is_project_admin
and user_is_sysadmin
?
1 Like
Hi @piskunovigorm,
I tested user_is_sysadmin
and it will not work for jira-admin and project admin. it is just only for system admin.
I am getting error while installing apps if I am using " user_is_project_admin
". Any Idea ?
I found the working solution. Project permissions works only on project related module in Jira. It will not work in general page
"modules": {
"generalPages": [
{
"location": "system.top.navigation.bar",
"weight": 50,
"name": {
"value": "My Report"
},
"key": "index-page",
"url": "/index",
"conditions": [
{
"condition": "user_is_admin"
}
],
"icon": {
"width": 30,
"height": 30,
"url": "/img/xxxx-blue.png"
}
}
],
"jiraProjectPages": [
{
"url": "/index?projectId=${project.id}",
"conditions": [
{
"condition": "has_project_permission",
"params": {
"permission": "ADMINISTER_PROJECTS"
}
}
],
"iconUrl": "/img/xxxx-blue.png",
"weight": 100,
"name": {
"value": "My Report"
},
"key": "project-index-page"
}
]
}