public class CurrentAssignee extends SimpleIssueFieldSecurityType
Constructor and Description |
---|
CurrentAssignee(JiraAuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
void |
doValidation(String key,
Map<String,String> parameters,
JiraServiceContext jiraServiceContext) |
String |
getDisplayName() |
protected String |
getField() |
protected String |
getFieldName(String parameter)
Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration.
|
protected String |
getFieldValue(Issue issue)
Returns the user key value for the given issue for the field that this security type checks.
|
String |
getType() |
Set<com.atlassian.crowd.embedded.api.User> |
getUsers(PermissionContext ctx,
String ignored)
Returns a list of
User s represented by a security type instance. |
protected boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
org.ofbiz.core.entity.GenericValue project)
This should return two different values depending on where it is called from.
|
protected boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
Project project)
Originally this method was intended to return false while issue creation, otherwise true.
|
hasIssuePermission, hasIssuePermission
getQuery, getQuery, getQueryForProject, getQueryForSecurityLevel, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission
getArgumentDisplay, isValidForPermission
public static final String DESC
public CurrentAssignee(JiraAuthenticationContext authenticationContext)
public String getDisplayName()
public String getType()
public 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(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 String getField()
getField
in class SimpleIssueFieldSecurityType
protected String getFieldValue(Issue issue)
SimpleIssueFieldSecurityType
getFieldValue
in class SimpleIssueFieldSecurityType
issue
- the Issuepublic Set<com.atlassian.crowd.embedded.api.User> getUsers(PermissionContext ctx, String ignored)
SecurityType
User
s represented by a security type instance. The collection must
not contain any nulls.ctx
- The current issue and projectignored
- Instance value, eg. a group name, user name, custom field idUser
s.Copyright © 2002-2015 Atlassian. All Rights Reserved.