@NonInjectableComponent public class

ProjectLiteralSanitiser

extends Object
implements LiteralSanitiser
java.lang.Object
   ↳ com.atlassian.jira.jql.permission.ProjectLiteralSanitiser

Class Overview

Sanitise the project keys, names or ids stored in QueryLiterals. 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.

Summary

Public Constructors
ProjectLiteralSanitiser(NameResolver<Project> projectResolver, PermissionManager permissionManager, ApplicationUser user)
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.permission.LiteralSanitiser

Public Constructors

public ProjectLiteralSanitiser (NameResolver<Project> projectResolver, PermissionManager permissionManager, ApplicationUser user)

Public Methods

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.

Parameters
literals the literals to sanitise; must not be null.
Returns
  • the result object containing the modification status and the resulting literals