public class CurrentReporterHasCreatePermission extends SimpleIssueFieldSecurityType
| Constructor and Description |
|---|
CurrentReporterHasCreatePermission(JiraAuthenticationContext jiraAuthenticationContext,
ProjectFactory projectFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
doValidation(String key,
Map 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<ApplicationUser> |
getUsers(PermissionContext ctx,
String ignored)
Returns a list of
ApplicationUsers represented by a security type instance. |
protected boolean |
hasProjectPermission(ApplicationUser user,
boolean issueCreation,
Project project) |
boolean |
isValidForPermission(ProjectPermissionKey permissionKey)
Is valid for all permissions except "Create Issue".
|
hasIssuePermissiongetQuery, getQuery, getQueryForProject, getQueryForSecurityLevel, hasPermission, hasPermission, hasPermission, hasPermissiongetArgumentDisplaypublic CurrentReporterHasCreatePermission(JiraAuthenticationContext jiraAuthenticationContext, ProjectFactory projectFactory)
public String getDisplayName()
public String getType()
public void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
public boolean isValidForPermission(ProjectPermissionKey permissionKey)
isValidForPermission in interface SchemeTypeisValidForPermission in class AbstractSecurityTypepermissionKey - permission key.CurrentReporterHasCreatePermissionprotected 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 String getField()
getField in class SimpleIssueFieldSecurityTypepublic Set<ApplicationUser> getUsers(PermissionContext ctx, String ignored)
SecurityTypeApplicationUsers 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 idApplicationUsers.protected String getFieldValue(Issue issue)
SimpleIssueFieldSecurityTypegetFieldValue in class SimpleIssueFieldSecurityTypeissue - the IssueCopyright © 2002-2015 Atlassian. All Rights Reserved.