Forums

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

Issue where editmeta doesn't reflect comment and attachment permissions

bronwyn.damm
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!
August 26, 2020

When a user doesn't have "Edit Issues" permission, but does have comment or attachment permissions, the comment/attachment field is not appearing in the editmeta of the GET /issue/{id}?expand=editmeta,schema,names

 

If the user has edit permissions, this method will allow me to determine if the user has comment permission.

 

Is there a reliable way to determine if the user has comment or attachment permissions in this call that doesn't depend on the other permissions the user has?

 

Details:

Jira version: 8.5.0

 

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2020

Hi,

I understand that you are using Jira Server, and looking to find out more about what permissions each user has to a particular issue.  The endpoint of GET /rest/api/2/issue/{issueIdOrKey} can use the expand parameter to get the editmeta data.  However that editmeta is only intended to show what you can edit as a user on that issue.

Technically a comment to an issue is not a field on the issue that can be edited.  The comments are directly related to the issue, but they are not exactly an issue field.  Also attachment is a special kind of field as well.  But I can certainly see why you would want to be able to see those permissions from that REST API call. 

Instead of using that endpoint, perhaps you could use GET /rest/api/2/mypermissions and specify the issueKey parameter when making that call.  This can return to you permissions such as "ADD_COMMENT" and "CREATE_ATTACHMENT" which can then tell you if your account has the permissions to do so on that particular issue.

Does this help?  Please let me know either way.

Andy

bronwyn.damm
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!
August 27, 2020

I was hoping to not have to make an additional call, but I can understand that determining these permissions wasn't the intended use of the GET /issue/(id} endpoint. Thank you for your help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events