public class GroupCF extends AbstractIssueFieldSecurityType
| Constructor and Description |
|---|
GroupCF(JiraAuthenticationContext jiraAuthenticationContext,
GroupSelectorUtils groupSelectorUtils,
CustomFieldManager customFieldManager,
GroupManager groupManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
doValidation(String key,
Map<String,String> parameters,
JiraServiceContext jiraServiceContext) |
String |
getArgumentDisplay(String argument) |
List<Field> |
getDisplayFields() |
String |
getDisplayName() |
protected String |
getFieldName(String parameter)
Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration.
|
protected org.apache.lucene.search.BooleanQuery |
getQueryForProject(Project project,
ApplicationUser searcher,
String fieldName)
Gets called to produce the Lucene query for a project
|
protected org.apache.lucene.search.BooleanQuery |
getQueryForSecurityLevel(IssueSecurityLevel issueSecurity,
ApplicationUser searcher,
String fieldName)
Produces a Lucene query for a given issue security type such that documents
match the query only when the given user is defined for the issue by this
custom field in the given security.
|
String |
getType() |
Set<ApplicationUser> |
getUsers(PermissionContext ctx,
String customFieldId)
Get user specified by the Custom Field
|
protected boolean |
hasIssuePermission(ApplicationUser user,
boolean issueCreation,
Issue issue,
String parameter) |
protected boolean |
hasProjectPermission(ApplicationUser user,
boolean issueCreation,
Project project) |
getQuery, getQuery, hasPermission, hasPermission, hasPermission, hasPermissionisValidForPermissionpublic static final String TYPE
public GroupCF(JiraAuthenticationContext jiraAuthenticationContext, GroupSelectorUtils groupSelectorUtils, CustomFieldManager customFieldManager, GroupManager groupManager)
public String getDisplayName()
public String getType()
@Nullable protected org.apache.lucene.search.BooleanQuery getQueryForProject(@Nonnull Project project, @Nullable ApplicationUser searcher, @Nonnull String fieldName)
AbstractIssueFieldSecurityTypegetQueryForProject in class AbstractIssueFieldSecurityTypeproject - The project for which to construct a querysearcher - The user who is searching to add to the querynull if the searcher is either
null or not a known userprotected org.apache.lucene.search.BooleanQuery getQueryForSecurityLevel(IssueSecurityLevel issueSecurity, ApplicationUser searcher, String fieldName)
AbstractIssueFieldSecurityTypegetQueryForSecurityLevel in class AbstractIssueFieldSecurityTypeissueSecurity - the security defined by this IssueFieldSecurityType instance.searcher - the user.null if user is either
null or not a known userpublic void doValidation(String key, Map<String,String> parameters, JiraServiceContext jiraServiceContext)
protected String getFieldName(String parameter)
AbstractIssueFieldSecurityTypeSome Field based permissions are based on hard-coded fields like assignee and reporter in which case the parameter is not used. Other types use the parameter to name the particular User or Group custom field that is used for the permission.
getFieldName in class AbstractIssueFieldSecurityTypeparameter - the parameter as saved in the configprotected boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project)
hasProjectPermission in class AbstractIssueFieldSecurityTypeprotected boolean hasIssuePermission(ApplicationUser user, boolean issueCreation, Issue issue, String parameter)
hasIssuePermission in class AbstractIssueFieldSecurityTypepublic String getArgumentDisplay(String argument)
getArgumentDisplay in interface SecurityTypegetArgumentDisplay in class AbstractSecurityTypepublic Set<ApplicationUser> getUsers(PermissionContext ctx, String customFieldId)
customFieldId - eg. 'customfield_10000'ctx - The current issue and projectApplicationUsers.Copyright © 2002-2015 Atlassian. All Rights Reserved.