com.atlassian.jira.security.type
Class AbstractIssueFieldSecurityType
java.lang.Object
com.atlassian.jira.security.type.AbstractSecurityType
com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
- All Implemented Interfaces:
- SchemeType, SecurityType
- Direct Known Subclasses:
- CurrentAssignee, CurrentReporter
- public abstract class AbstractIssueFieldSecurityType
- extends AbstractSecurityType
Created by IntelliJ IDEA.
User: Owen
Date: 23/06/2003
Time: 13:57:03
To change this template use Options | File Templates.
Method Summary |
protected abstract java.lang.String |
getFieldName()
|
Query |
getQuery(User searcher,
GenericValue entity)
|
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)
This function takes a user a decides if they have a permission
If the user is null they can never have the permission so false is returned. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIssueFieldSecurityType
public AbstractIssueFieldSecurityType()
getFieldName
protected abstract java.lang.String getFieldName()
getQuery
public Query getQuery(User searcher,
GenericValue entity)
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:
hasPermission(GenericValue, java.lang.String)
,
hasPermission(GenericValue, java.lang.String)
,
ProjectLead.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)
- This function takes a user a decides if they have a permission
If the user is null they can never have the permission so false is returned.
If the entity is a Project the permission is always true as report and assignee have no context in a projec only on the issues with the projet
It the entity is an Issue check if the user is in the relevent field in the issue
- Parameters:
entity
- The Generic Value. Shoule be an Issueargument
- Not needed for this implementationuser
- 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 assignee otherwise false
- See Also:
hasPermission(GenericValue, java.lang.String)
,
ProjectLead.hasPermission(GenericValue, java.lang.String)
,
SingleUser.hasPermission(GenericValue, java.lang.String)
,
GroupDropdown.hasPermission(GenericValue, java.lang.String)