Class ApplicationRoleSecurityType

All Implemented Interfaces:
SchemeType, SecurityType

public class ApplicationRoleSecurityType extends AbstractProjectsSecurityType
Represents a security type for application roles to be configured on project permission schemes. Admins will be able to select licensed applications or 'Any logged in user'. Note, the 'Any logged in user' option gives permission to any user that belongs to a group associated with an application role.
Since:
7.0
  • Field Details

  • Constructor Details

  • Method Details

    • getDisplayName

      public String getDisplayName()
    • getArgumentDisplay

      public String getArgumentDisplay(String argument)
      Specified by:
      getArgumentDisplay in interface SecurityType
      Overrides:
      getArgumentDisplay in class AbstractSecurityType
    • getType

      public String getType()
    • hasPermission

      public boolean hasPermission(Project project, String applicationRole)
      Description copied from interface: SchemeType
      Determines if this permission type is satisfied for anonymous access.
      Parameters:
      project - This is the project that the security is being checked for
      applicationRole - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
      Returns:
      true if anonymous Users have this permission.
    • hasPermission

      public boolean hasPermission(Issue issue, String parameter)
      Description copied from interface: SchemeType
      Determines if this permission type is satisfied for anonymous access.
      Parameters:
      issue - This is the issue that the security is being checked for
      parameter - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
      Returns:
      true if anonymous Users have this permission.
    • hasPermission

      public boolean hasPermission(Project project, String parameter, ApplicationUser user, boolean issueCreation)
      Description copied from interface: SchemeType
      Determines if this permission type is satisfied.
      Parameters:
      project - This is the project that the security is being checked for
      parameter - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
      user - The user for whom the permission is being checked
      issueCreation - Whether this permission is being checked during issue creation
      Returns:
      true if the given User has this permission.
    • hasPermission

      public boolean hasPermission(Issue issue, String parameter, ApplicationUser user, boolean issueCreation)
      Description copied from interface: SchemeType
      Determines if this permission type is satisfied.
      Parameters:
      issue - This is the issue that the security is being checked for
      parameter - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
      user - The user for whom the permission is being checked
      issueCreation - Whether this permission is being checked during issue creation
      Returns:
      true if the given User has this permission.
    • doValidation

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

      public Set<ApplicationRole> getApplicationRoles()
    • getUsers

      public Set<ApplicationUser> getUsers(PermissionContext ctx, String applicationId)
      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
      applicationId - Instance value, eg. a group name, user name, custom field id
      Returns:
      A set of ApplicationUsers.