Class CurrentAssignee

All Implemented Interfaces:
SchemeType, SecurityType

public class CurrentAssignee extends SimpleIssueFieldSecurityType
  • Field Details

  • Constructor Details

  • Method Details

    • getDisplayName

      public String getDisplayName()
    • getType

      public String getType()
    • doValidation

      public void doValidation(String key, Map<String,String> parameters, JiraServiceContext jiraServiceContext)
    • getFieldName

      protected String getFieldName(String parameter)
      Description copied from class: AbstractIssueFieldSecurityType
      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.

      Specified by:
      getFieldName in class AbstractIssueFieldSecurityType
      Parameters:
      parameter - the parameter as saved in the config
      Returns:
      the field name for this Issue Field-based Security Type.
    • hasProjectPermission

      protected boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project)
      Originally this method was intended to return false while issue creation, otherwise true. Due to JRA-31720 after check for issue creation it returns true only if given user has at least one issue assigned in given project.
      Specified by:
      hasProjectPermission in class AbstractIssueFieldSecurityType
    • getField

      protected String getField()
      Specified by:
      getField in class SimpleIssueFieldSecurityType
    • getFieldValue

      protected String getFieldValue(Issue issue)
      Description copied from class: SimpleIssueFieldSecurityType
      Returns the user key value for the given issue for the field that this security type checks.
      Specified by:
      getFieldValue in class SimpleIssueFieldSecurityType
      Parameters:
      issue - the Issue
      Returns:
      the user key value for the given issue for the field that this security type checks.
    • getUsers

      public Set<ApplicationUser> getUsers(PermissionContext ctx, String ignored)
      Description copied from interface: SecurityType
      Returns a set of ApplicationUsers represented by a security type instance. The collection must not contain any nulls.
      Parameters:
      ctx - The current issue and project
      ignored - Instance value, eg. a group name, user name, custom field id
      Returns:
      A set of ApplicationUsers.