Our new Appfire Documentation Space is now live!
Take a look here! If you have any questions please email support@appfire.com
Code snippet to check that the current user is a member of a specific group
Abstract
This code snippet checks that the current user is the member of a specific group.
Logic
Iterate over the array of objects or set of values and check a specific field for the required value.
Snippet
ComponentAccessor.getGroupManager().isUserInGroup(currentUser, "<Name of the group>")
Placeholders
Placeholder | Description | Example |
---|---|---|
<Name of the group> | Name of the group | jira-administrators |
Examples
The output of the code is a boolean value (true
or false)
which you could use to conditionally execute a Post-function/Condition/Validator or Unlink issues, for example: To assign the issue to the current user only when the user belongs to the "jira-administrators" group.
ComponentAccessor.getGroupManager().isUserInGroup(currentUser, "jira-administrators")
References
Related articles