@PublicApi public class

UserFilter

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

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

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.

Summary

Fields
public static final UserFilter DISABLED
public static final UserFilter ENABLED_NO_USERS
Public Constructors
UserFilter(boolean enabled, Collection<Long> roleIds, Collection<String> groups)
Public Methods
Set<String> getGroups()
This value is only considered if isEnabled() returns true.
Set<Long> getRoleIds()
This value is only considered if isEnabled() returns true.
boolean isEnabled()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final UserFilter DISABLED

public static final UserFilter ENABLED_NO_USERS

Public Constructors

public UserFilter (boolean enabled, Collection<Long> roleIds, Collection<String> groups)

Public Methods

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.

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.

public boolean isEnabled ()