public interface SecurityType extends SchemeType
Modifier and Type | Method and Description |
---|---|
String |
getArgumentDisplay(String argument) |
Set<org.apache.lucene.util.BytesRef> |
getPermissionFieldContents(ApplicationUser searcher,
Project project,
IssueSecurityLevel securityLevel,
String parameter)
Returns a set of (
issue level permission field )
contents based on the security level, the project and optionally the parameter (for role-based queries). |
Set<org.apache.lucene.util.BytesRef> |
getPermissionFieldContents(ApplicationUser searcher,
Project project,
String parameter)
Returns a set of (
project permission field )
contents based on the project and optionally the parameter (for role-based queries). |
Set<ApplicationUser> |
getUsers(PermissionContext permissionContext,
String argument)
Deprecated.
Since 9.12. Use
getUsers(PermissionContext, String, String, int) instead. |
default Set<ApplicationUser> |
getUsers(PermissionContext permissionContext,
String argument,
String userSearchName,
int limit)
Returns a set of
ApplicationUser s represented by a security type instance
optionally filtered by given userSearchName. |
boolean |
isTopLevelIssueSecurityPermission()
Returns true if this permission depends only on a issue security level value and not on project or any field value.
|
boolean |
isTopLevelProjectPermission()
Returns true if this permission depends only on a project value and not on issue security level or any field value.
|
doValidation, getDisplayName, getType, hasPermission, hasPermission, hasPermission, hasPermission, isValidForPermission
boolean isTopLevelProjectPermission()
boolean isTopLevelIssueSecurityPermission()
Set<org.apache.lucene.util.BytesRef> getPermissionFieldContents(ApplicationUser searcher, Project project, String parameter)
project permission field
)
contents based on the project and optionally the parameter (for role-based queries).
This is needed to build project security scheme query.searcher
- The searcher conducting the searchproject
- The project for which we're constructing the permissions field contentsparameter
- Parameter identifying user related field (reporter, assignee, etc)SecurityIndexingUtils
Set<org.apache.lucene.util.BytesRef> getPermissionFieldContents(ApplicationUser searcher, Project project, IssueSecurityLevel securityLevel, String parameter)
issue level permission field
)
contents based on the security level, the project and optionally the parameter (for role-based queries).
This is needed to build issue security level query.searcher
- The searcher conducting the searchproject
- The project for which we're constructing a querysecurityLevel
- The security level for which we are constructing the permissions field contentsparameter
- Parameter identifying user related field (reporter, assignee, etc)SecurityIndexingUtils
@Deprecated Set<ApplicationUser> getUsers(@Nonnull PermissionContext permissionContext, @Nullable String argument)
getUsers(PermissionContext, String, String, int)
instead.ApplicationUser
s represented by a security type instance. The collection must
not contain any nulls.permissionContext
- The current issue and projectargument
- Instance value, eg. a group name, user name, custom field idApplicationUser
s.IllegalArgumentException
- if argument is invalid for this type.@Nonnull default Set<ApplicationUser> getUsers(@Nonnull PermissionContext permissionContext, @Nullable String argument, @Nonnull String userSearchName, int limit)
ApplicationUser
s represented by a security type instance
optionally filtered by given userSearchName.
The implementation must be as performant as possible and return users sorted by lowercase display name, then lowercase username.
The default implementation is provided only not to break existing implementations and should be avoided at all cost.
permissionContext
- the context this method is called in; contains issue and projectargument
- instance value, e.g. group name, username, custom field iduserSearchName
- query for user name; may be blanklimit
- maximum number of users to returnIllegalArgumentException
- if argument is invalid for this type.Copyright © 2002-2024 Atlassian. All Rights Reserved.