|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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(Object o)
|
int |
hashCode()
|
boolean |
hasPermissionToUseClause(com.atlassian.crowd.embedded.api.User user)
Checks to see that the provided user is able to use the clause. |
Clause |
sanitise(com.atlassian.crowd.embedded.api.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. |
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.atlassian.crowd.embedded.api.User user)
ClausePermissionChecker
hasPermissionToUseClause in interface ClausePermissionCheckeruser - to check permissions against.
public Clause sanitise(com.atlassian.crowd.embedded.api.User user,
TerminalClause clause)
ClauseSanitiserGiven 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 ClauseSanitiseruser - the user performing the searchclause - the clause to be sanitised
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||