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 Set<org.apache.lucene.util.BytesRef> |
getPermissionFieldContentsForProject(Project project,
ApplicationUser searcher,
String fieldName)
Gets called to produce the Lucene query for a project
|
protected Set<org.apache.lucene.util.BytesRef> |
getPermissionFieldContentsForSecurityLevel(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) |
getPermissionFieldContents, getPermissionFieldContents, hasPermission, hasPermission, hasPermission, hasPermission, isTopLevelIssueSecurityPermission, isTopLevelProjectPermission
isValidForPermission
public static final String TYPE
public GroupCF(JiraAuthenticationContext jiraAuthenticationContext, GroupSelectorUtils groupSelectorUtils, CustomFieldManager customFieldManager, GroupManager groupManager)
public String getDisplayName()
public String getType()
@Nullable protected Set<org.apache.lucene.util.BytesRef> getPermissionFieldContentsForProject(@Nonnull Project project, @Nullable ApplicationUser searcher, @Nonnull String fieldName)
AbstractIssueFieldSecurityType
getPermissionFieldContentsForProject
in class AbstractIssueFieldSecurityType
project
- 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 Set<org.apache.lucene.util.BytesRef> getPermissionFieldContentsForSecurityLevel(IssueSecurityLevel issueSecurity, ApplicationUser searcher, String fieldName)
AbstractIssueFieldSecurityType
getPermissionFieldContentsForSecurityLevel
in class AbstractIssueFieldSecurityType
issueSecurity
- 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)
AbstractIssueFieldSecurityType
Some 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 AbstractIssueFieldSecurityType
parameter
- the parameter as saved in the configprotected boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project)
hasProjectPermission
in class AbstractIssueFieldSecurityType
protected boolean hasIssuePermission(ApplicationUser user, boolean issueCreation, Issue issue, String parameter)
hasIssuePermission
in class AbstractIssueFieldSecurityType
public String getArgumentDisplay(String argument)
getArgumentDisplay
in interface SecurityType
getArgumentDisplay
in class AbstractSecurityType
public Set<ApplicationUser> getUsers(PermissionContext ctx, String customFieldId)
customFieldId
- eg. 'customfield_10000'ctx
- The current issue and projectApplicationUser
s.Copyright © 2002-2021 Atlassian. All Rights Reserved.