public class

CurrentAssigneeHasAssignablePermission

extends SimpleIssueFieldSecurityType
java.lang.Object
   ↳ com.atlassian.jira.security.type.AbstractSecurityType
     ↳ com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
       ↳ com.atlassian.jira.security.type.SimpleIssueFieldSecurityType
         ↳ com.atlassian.jira.security.type.CurrentAssigneeHasAssignablePermission

Summary

Public Constructors
CurrentAssigneeHasAssignablePermission(JiraAuthenticationContext jiraAuthenticationContext, ProjectFactory projectFactory)
Public Methods
void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
String getDisplayName()
String getType()
Set<ApplicationUser> getUsers(PermissionContext ctx, String ignored)
boolean isValidForPermission(ProjectPermissionKey permissionKey)
Is valid for all permissions except "Assignable".
Protected Methods
String getField()
String getFieldName(String parameter)
Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration.
String getFieldValue(Issue issue)
Returns the user key value for the given issue for the field that this security type checks.
boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project)
[Expand]
Inherited Methods
From class com.atlassian.jira.security.type.SimpleIssueFieldSecurityType
From class com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
From class com.atlassian.jira.security.type.AbstractSecurityType
From class java.lang.Object
From interface com.atlassian.jira.scheme.SchemeType
From interface com.atlassian.jira.security.type.SecurityType

Public Constructors

public CurrentAssigneeHasAssignablePermission (JiraAuthenticationContext jiraAuthenticationContext, ProjectFactory projectFactory)

Public Methods

public void doValidation (String key, Map parameters, JiraServiceContext jiraServiceContext)

public String getDisplayName ()

public String getType ()

public Set<ApplicationUser> getUsers (PermissionContext ctx, String ignored)

public boolean isValidForPermission (ProjectPermissionKey permissionKey)

Is valid for all permissions except "Assignable".

Because we rely on the permissions for the "Assignable" function, then not only does it not make sense to add this role to "Assignable", it would actually cause an infinite loop. see JRA-13315

Parameters
permissionKey permission key.
Returns
  • false for Permissions.ASSIGNABLE_USER, true otherwise.

Protected Methods

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.

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.

Parameters
parameter the parameter as saved in the config
Returns
  • the field name for this Issue Field-based Security Type.

protected String getFieldValue (Issue issue)

Returns the user key value for the given issue for the field that this security type checks.

Parameters
issue the Issue
Returns
  • the user key value for the given issue for the field that this security type checks.

protected boolean hasProjectPermission (ApplicationUser user, boolean issueCreation, Project project)