java.lang.Object |
↳ |
com.atlassian.jira.jql.permission.DefaultClausePermissionHandler |
Fields
Public Constructors
Public Methods
public
boolean
equals
(Object o)
public
boolean
hasPermissionToUseClause
(User searcher, Set<FieldLayout> fieldLayouts)
Checks to see that the provided user is able to use the clause.
This method provides all the FieldLayouts visible to the given user as a shortcut otherwise individual checkers
can end up looking this up dozens or even hundreds of times with causes slow downs in our search (see JRADEV-15665).
Returns
- true if the user can use this clause, false otherwise.
public
boolean
hasPermissionToUseClause
(User user)
Checks to see that the provided user is able to use the clause. This may be as simple as determining if the user
has permission to see the field that the clause represents.
Parameters
user
| to check permissions against. |
Returns
- true if the user can use this clause, false otherwise.
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.
Parameters
user
| the user performing the search |
clause
| the clause to be sanitised |
Returns
- the sanitised clause; never null.