Hi!
Currently, we are implementing additional web panels in Jira and we want to disable them for users which don’t have permission to do these functions based on user groups.
Therefore in your documentation, we found information about conditions that should be applied to each web-panels in the atlassian-connect.json file. And we want to use this condition: “entity_property_contains_any_user_group” but it won’t work.
We found this information in these two docs:
https://developer.atlassian.com/cloud/confluence/connect-conditions/#property-conditions
https://developer.atlassian.com/cloud/jira/platform/connect-conditions/
Our syntax for this condition looks like this:
"condition": "entity_property_contains_any_user_group",
"params": {
"entity": "user",
"propertyKey": "groups",
"objectName": "[\"example-group\"]"
}
In this case, if we swap"example-group" with a proper user group panel is disabled but it should be enabled. In addition, we found in your docs that to access user groups it is necessary to add parameter expand, and in this case, the request looks that “/user?accountId={user.accountId}&expand=groups”. Maybe we should pass something similar into our entity?
Example user entity looks that:
{
"self": "url",
"accountId": "id",
"accountType": "atlassian",
"avatarUrls": {
"48x48": "url",
"24x24": "url",
"16x16": "url",
"32x32": "url"
},
"displayName": "Name",
"active": true,
"timeZone": "Europe/Warsaw",
"locale": "en_GB",
"groups": {
"size": 1,
"items": []
},
"applicationRoles": {
"size": 3,
"items": []
},
"expand": "groups,applicationRoles"
}
We found such a solution Solution but it would be a great help if you can indicate how looks proper syntax for this case or indicate another solution to cope with that.
Regards,
Peter