com.atlassian.jira.jql.permission
Class ProjectLiteralSanitiser
java.lang.Object
com.atlassian.jira.jql.permission.ProjectLiteralSanitiser
- All Implemented Interfaces:
- LiteralSanitiser
@NonInjectableComponent
public class ProjectLiteralSanitiser
- extends Object
- implements LiteralSanitiser
Sanitise the project keys, names or ids stored in QueryLiteral
s.
The strategy is to sanitise only those projects which both exist and the user does not have permission to browse.
The sanitised form of the operand replaces the name or key form with the id representation.
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProjectLiteralSanitiser
public ProjectLiteralSanitiser(NameResolver<Project> projectResolver,
PermissionManager permissionManager,
User user)
sanitiseLiterals
public LiteralSanitiser.Result sanitiseLiterals(List<QueryLiteral> literals)
- We make a big assumption here that a single project literal will never expand out into more than one project id,
because of the rules around project names and resolving. This means that we should always get the same number of
literals returned as that are passed in.
- Specified by:
sanitiseLiterals
in interface LiteralSanitiser
- Parameters:
literals
- the literals to sanitise; must not be null.
- Returns:
- the result object containing the modification status and the resulting literals
Copyright © 2002-2009 Atlassian. All Rights Reserved.