Versions Compared

Key

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

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=hasPermission+-+15486576
widthauto

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

hasPermission(permissionId, user[, issueKey])

Package

Alias

Pkg Usage

...

Code Block
include "permissions.incl"; // assuming the file is in the default programs folder 
for(string user in usersInGroups({"QA-Testers"})){ 
	if(hasPermission(ASSIGNABLE_USER, user, key)){ 
		assignee = user; 
		return; 
	} 
}

Note

This routine function also verifies the issue security level. If the specified user cannot see the issue because his security level does not allow it, the routine function 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.

...

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "user_routine" and space = currentSpace ( )
labelsarray_routines

...