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