|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.type.AbstractSecurityType com.atlassian.jira.security.type.AbstractIssueFieldSecurityType com.atlassian.jira.security.type.GroupCF
public class GroupCF
Issue Security and Permission type for a Group Selector custom field, or select-list custom fields which specify groups.
Field Summary | |
---|---|
static String |
TYPE
|
Constructor Summary | |
---|---|
GroupCF(JiraAuthenticationContext jiraAuthenticationContext,
GroupSelectorUtils groupSelectorUtils,
CustomFieldManager customFieldManager,
GroupManager groupManager)
|
Method Summary | |
---|---|
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,
com.atlassian.crowd.embedded.api.User searcher,
String fieldName)
Gets called to produce the Lucene query for a project |
protected org.apache.lucene.search.BooleanQuery |
getQueryForSecurityLevel(IssueSecurityLevel issueSecurity,
com.atlassian.crowd.embedded.api.User 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<com.atlassian.crowd.embedded.api.User> |
getUsers(PermissionContext ctx,
String customFieldId)
Get user specified by the Custom Field |
protected boolean |
hasIssuePermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
org.ofbiz.core.entity.GenericValue issueGv,
String customFieldName)
Determines if the given user has permission to see the given issue by using the custom field with the given custom field name to look up a group. |
protected boolean |
hasIssuePermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
Issue issue,
String parameter)
|
protected boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
org.ofbiz.core.entity.GenericValue project)
|
protected boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
Project project)
|
Methods inherited from class com.atlassian.jira.security.type.AbstractIssueFieldSecurityType |
---|
getQuery, getQuery, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission |
Methods inherited from class com.atlassian.jira.security.type.AbstractSecurityType |
---|
isValidForPermission |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TYPE
Constructor Detail |
---|
public GroupCF(JiraAuthenticationContext jiraAuthenticationContext, GroupSelectorUtils groupSelectorUtils, CustomFieldManager customFieldManager, GroupManager groupManager)
Method Detail |
---|
public String getDisplayName()
public String getType()
protected org.apache.lucene.search.BooleanQuery getQueryForProject(Project project, com.atlassian.crowd.embedded.api.User searcher, String fieldName)
AbstractIssueFieldSecurityType
getQueryForProject
in class AbstractIssueFieldSecurityType
project
- The project for which to construct a querysearcher
- The user who is searching to add to the query
null
if the searcher is either
null
or not a known userprotected org.apache.lucene.search.BooleanQuery getQueryForSecurityLevel(IssueSecurityLevel issueSecurity, com.atlassian.crowd.embedded.api.User searcher, String fieldName)
AbstractIssueFieldSecurityType
getQueryForSecurityLevel
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 config
protected boolean hasProjectPermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue project)
hasProjectPermission
in class AbstractIssueFieldSecurityType
protected boolean hasProjectPermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, Project project)
hasProjectPermission
in class AbstractIssueFieldSecurityType
protected boolean hasIssuePermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue issueGv, String customFieldName)
hasIssuePermission
in class AbstractIssueFieldSecurityType
user
- the user for whom permission is being determined.issueCreation
- not used.issueGv
- the issue to which permission is being determinedcustomFieldName
- the name of the custom field.
protected boolean hasIssuePermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, Issue issue, String parameter)
hasIssuePermission
in class AbstractIssueFieldSecurityType
public List<Field> getDisplayFields()
public String getArgumentDisplay(String argument)
getArgumentDisplay
in interface SecurityType
getArgumentDisplay
in class AbstractSecurityType
public Set<com.atlassian.crowd.embedded.api.User> getUsers(PermissionContext ctx, String customFieldId)
customFieldId
- eg. 'customfield_10000'ctx
- The current issue and project
User
s.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |