Hi all,
I’m trying to save user properties from a Jira cloud add-on, but I’m getting a 403 return code. The scenario is that the current logged in user makes a client code to save a property as follows:
setupAjax: function()
{
var token = $("meta[name=token]");
$.ajaxSetup(
{
headers: {
'Authorization': 'JWT ' + token.attr("content"),
'Accept': 'application/json',
'Content-Type': 'application/json' }
});
}
AP.require('request', function(request)
{
request(
{
url: '/rest/api/3/user/properties/' + propertyKey + '?accountId=' + deeperData.atlassianAccountId,
type: 'PUT',
body: deeperData.productTourSections,
success: function(response)
{
console.log("saveUserPropertiesPromise():success");
console.log(response);
},
error: function(response)
{
console.log("saveUserPropertiesPromise():error");
console.log(response);
}
});
});
The documentation states that:
Permissions required:
- Administer Jira global permission, to set a property on any user.
- Access to Jira, to set a property on the calling user’s record.
Hence my question: for an add-on to save user properties, is there an admin action to perform so that any user using the add-on can save its user properties?
Thank you,
F.