|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.jql.permission.DefaultClausePermissionHandler
public class DefaultClausePermissionHandler
The default implementation of a ClausePermissionHandler
. To fulfill the
responsibilities of the composite interfaces ClauseSanitiser
and
ClausePermissionChecker
, this class simply holds one reference to each
interface, and delegates to those instances.
Constructor Summary | |
---|---|
DefaultClausePermissionHandler(ClausePermissionChecker permissionChecker)
|
|
DefaultClausePermissionHandler(ClausePermissionChecker permissionChecker,
ClauseSanitiser sanitiser)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
hasPermissionToUseClause(com.opensymphony.user.User user)
Checks to see that the provided user is able to use the clause. |
Clause |
sanitise(com.opensymphony.user.User user,
TerminalClause clause)
Given a user and a clause, will return a sanitised clause that when possible will not contain any information that the specified user does not have permission to see. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultClausePermissionHandler(ClausePermissionChecker permissionChecker)
public DefaultClausePermissionHandler(ClausePermissionChecker permissionChecker, ClauseSanitiser sanitiser)
Method Detail |
---|
public boolean hasPermissionToUseClause(com.opensymphony.user.User user)
ClausePermissionChecker
hasPermissionToUseClause
in interface ClausePermissionChecker
user
- to check permissions against.
public Clause sanitise(com.opensymphony.user.User user, TerminalClause clause)
ClauseSanitiser
Given a user and a clause, will return a sanitised clause that when possible will not contain any information that the specified user does not have permission to see. For example, if the given clause names a project that the user cannot browse, a sanitiser might return a new clause with the name of the project replaced with the id.
It is important that the returned clause is equivalent to the input clause, within the constraints of the permissible clauses for the specified user.
sanitise
in interface ClauseSanitiser
user
- the user performing the searchclause
- the clause to be sanitised
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |