Class UserFilter

java.lang.Object
com.atlassian.jira.user.UserFilter

@PublicApi public class UserFilter extends Object
Represents user filtering setting.

If isEnabled() is false, then it always refers to all active users.

If isEnabled() is true, it's subject to the restrictions from getGroups() and getRoleIds().

Current implementation supports filters by groups and/or project roles. The filters are OR-ed, i.e., if 2 group filters and 3 project role filters are specified, the final set of users allowed is the union of the 5 sets of users from the 5 filters. If no filters are specified and isEnabled() is true, no users are allowed.

Since:
v6.2
  • Field Details

    • DISABLED

      public static final UserFilter DISABLED
    • ENABLED_NO_USERS

      public static final UserFilter ENABLED_NO_USERS
  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
    • getGroups

      public Set<String> getGroups()
      This value is only considered if isEnabled() returns true.

      If null or empty, it means NO users are allowed from group restriction point of view. Note that some users might still be allowed due to project role based restriction. getRoleIds()

      If not empty, it means only users from the groups are allowed. Note that some other users might still be allowed due to project role based restriction.

      Returns:
    • getRoleIds

      public Set<Long> getRoleIds()
      This value is only considered if isEnabled() returns true.

      If null or empty, it means NO users are allowed from project role restriction point of view. Note that some users might still be allowed due to group based restriction. getGroups()

      If not empty, it means only users from the project roles are allowed. Note that some other users might still be allowed due to group based restriction.

      Returns: