com.atlassian.jira.security.type
Class SingleUser

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

public class SingleUser
extends AbstractProjectsSecurityType


Field Summary
static java.lang.String DESC
           
 
Constructor Summary
SingleUser()
           
 
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 single user is the same as the current user.
 
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

SingleUser

public SingleUser()
Method Detail

getDisplayName

public java.lang.String getDisplayName()

getType

public java.lang.String getType()

doValidation

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

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), ProjectLead.hasPermission(GenericValue, java.lang.String), 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 single user is the same as the current user. If it is not then false is returned.

Parameters:
entity - Not needed for this implementation
argument - The user name that the check is based on
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 current user otherwise false
See Also:
AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), AbstractIssueFieldSecurityType.hasPermission(GenericValue, java.lang.String), ProjectLead.hasPermission(GenericValue, java.lang.String), GroupDropdown.hasPermission(GenericValue, java.lang.String)