com.atlassian.jira.security.type
Class ProjectLead

java.lang.Object
  extended bycom.atlassian.jira.security.type.AbstractSecurityType
      extended bycom.atlassian.jira.security.type.AbstractProjectsSecurityType
          extended bycom.atlassian.jira.security.type.ProjectLead
All Implemented Interfaces:
SchemeType, SecurityType

public class ProjectLead
extends AbstractProjectsSecurityType


Field Summary
static java.lang.String DESC
           
 
Constructor Summary
ProjectLead()
           
 
Method Summary
 boolean doValidation(java.lang.String key, java.util.Map parameters)
           
 java.lang.String getDisplayName()
           
 java.lang.String getType()
           
 boolean hasPermission(GenericValue entity, java.lang.String argument)
          Interface for determining if a permission type has the permission
 boolean hasPermission(GenericValue entity, java.lang.String argument, User user)
          Determines if the user is the project lead for the project.
 
Methods inherited from class com.atlassian.jira.security.type.AbstractProjectsSecurityType
getQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESC

public static final java.lang.String DESC
See Also:
Constant Field Values
Constructor Detail

ProjectLead

public ProjectLead()
Method Detail

getDisplayName

public java.lang.String getDisplayName()

getType

public java.lang.String getType()

hasPermission

public boolean hasPermission(GenericValue entity,
                             java.lang.String argument)
Description copied from interface: SchemeType
Interface for determining if a permission type has the permission

Parameters:
entity -
argument -
Returns:
See Also:
AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), hasPermission(GenericValue, java.lang.String), SingleUser.hasPermission(GenericValue, java.lang.String), GroupDropdown.hasPermission(GenericValue, java.lang.String)

hasPermission

public boolean hasPermission(GenericValue entity,
                             java.lang.String argument,
                             User user)
Determines if the user is the project lead for the project. The current project is derived from the entity using JiraUtils.getProject. If it is not then false is returned.

Parameters:
entity - The Generic Value. Should be an Issue or a Project
argument - Not needed for this implementation
user - User to check the permission on. If it is null then the check is made on the current user
Returns:
true if the user is the project lead otherwise false
See Also:
AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), SingleUser.hasPermission(GenericValue, java.lang.String), GroupDropdown.hasPermission(GenericValue, java.lang.String)

doValidation

public boolean doValidation(java.lang.String key,
                            java.util.Map parameters)