userHasAccessToComment

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center?Ā Click hereĀ !

The availability of the users personal data may be impacted by the recent changes by Atlassian in order to meet GDPR compliance. See the following for more information:


Availability

  • This routine is available starting withĀ katl-commons 1.0.
  • This routine is available for Jira server and cloud deployment options.


Syntax for the server version

userHasAccessToComment(user, comment_id)

Syntax for the cloud version

userHasAccessToComment(issue, user, comment_id)


Description

Verifies if a comment is visible for an user.

Parameters for the server version

Parameter nameTypeRequiredDescription
userStringYesUsername or userkey of the user.
comment_idNumberYesId of the comment.

The look-up is first made after the userkey, then after the username.

Parameters for the cloud version

Parameter nameTypeRequiredDescription
issueStringYesThe issue key.
userStringYesThe account id of the user.
comment_idNumberYesId of the comment.

Return type

boolean (true/false)

AĀ "true"Ā return value means that the user can see the comment.

Example (server only)

Ā 

userHasAccessToComment("admin","10000");

ReturnsĀ "true"Ā if the user "admin"Ā can see the comment with id "10000" andĀ "false"Ā if theĀ userĀ cannot see the comment.

Example (cloud only)

Ā 

userHasAccessToComment(key, "admin","10000");

ReturnsĀ "true"Ā if the user "admin"Ā can see the comment with id "10000"Ā  from the current issue andĀ "false"Ā if theĀ userĀ cannot see the comment.

See also