Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleAvailability

This routine is available starting with katl-commons 2.0.6 for Jira 5.x or katl-commons 1.1.13 for Jira 4.3.x/4.4.x.

Syntax

hasPermission(permissionId, user[, issueKey])

...

Parameter name

Type

Required

Description

permissionId

Number

Yes

The permission ID.

user

String

Yes

The username or userkey to check the permission for.

issueKeyStringNoThe issue key. Only required for non-global permissions.

...

Returns true if the user has the specified permission, or false otherwise.

Note
titleNote

 This This routine also verifies the issue security level. If the specified user cannot see the issue because his security level does not allow it, the routine will return false for the project permissions even if the user does have the specified privilege. This happens because the issue security comes first and will prohibit the user from taking actions that are otherwise allowed by the permission scheme.

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

...