Forums

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

How to get comments(attachments) filtered by permissions

Svetoslav
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!
September 30, 2020

Hello
I'm getting tasks/issues with attached files (comments) and I want to filter those files/comments by permissions (If comment is internal/private a user without certain permissions can't see it.)

I used:
- getCommentsForUser(Issue issue, ApplicationUser user) from
https://docs.atlassian.com/software/jira/docs/api/8.12.0/com/atlassian/jira/issue/comments/CommentManager.html
- hasBrowsePermission(ApplicationUser user, Comment comment) from
https://docs.atlassian.com/software/jira/docs/api/8.12.0/com/atlassian/jira/issue/comments/CommentPermissionManager.html

Those two methods return that a user with no given permissions is eligable to see all comments.
Am I missing or what can I use to filter them?

Best regards
Svetoslav

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events