Package com.atlassian.jira.security.util
Class GroupSelectorUtils
java.lang.Object
com.atlassian.jira.security.util.GroupSelectorUtils
Utility class for mapping group custom field values to the corresponding groups and/or users.
-
Constructor Summary
ConstructorDescriptionGroupSelectorUtils
(FieldManager fieldManager, UserUtil userUtil, GroupManager groupManager) -
Method Summary
Modifier and TypeMethodDescriptionGet all custom fields that could possibly be identifying a group.Get users from a group chosen by a Group Selector custom field, in a certain issue.boolean
isUserInCustomFieldGroup
(Issue issue, CustomField field, ApplicationUser user) Determines if a user is a member of a group specified by a custom field value.
-
Constructor Details
-
GroupSelectorUtils
-
-
Method Details
-
getUsers
Get users from a group chosen by a Group Selector custom field, in a certain issue.- Parameters:
issue
- The current issuecustomFieldId
- Id ofGroupSelectorField
.- Returns:
- Set of
ApplicationUser
s.
-
getUsers
-
getCustomFieldsSpecifyingGroups
Get all custom fields that could possibly be identifying a group. For example, select-lists, text fields.- Returns:
- list of Field objects, never null
-
isUserInCustomFieldGroup
Determines if a user is a member of a group specified by a custom field value.- Parameters:
issue
- The current issuefield
- The custom field specifying the group(s). Eg. a select-list.user
- The user we wish to check for- Returns:
- If user is in one of the groups specified by the custom field.
-