Package com.atlassian.jira.jql.query
Class QueryProjectRoleAndGroupPermissionsDecorator
java.lang.Object
com.atlassian.jira.jql.query.QueryProjectRoleAndGroupPermissionsDecorator
@Deprecated(since="10.5",
forRemoval=true)
public class QueryProjectRoleAndGroupPermissionsDecorator
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
A component that can add project role and group permission checks to lucene queries.
- Since:
- v6.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.lucene.search.BooleanQueryDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionQueryProjectRoleAndGroupPermissionsDecorator(PermissionManager permissionManager, ProjectRoleManager projectRoleManager) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.QueryappendPermissionFilterQuery(org.apache.lucene.search.Query query, QueryCreationContext queryCreationContext, String groupLevelField, String roleLevelField) Deprecated, for removal: This API element is subject to removal in a future version.Append the permission query to the passed query.org.apache.lucene.search.QuerycreatePermissionQuery(QueryCreationContext queryCreationContext, String groupLevelField, String roleLevelField) Deprecated, for removal: This API element is subject to removal in a future version.Creates the lucene query that will restrict the results to only elements that are visible to the user based on the query creation context and elements' group and role visibility levels.org.apache.lucene.search.QuerydecorateWorklogQueryWithPermissionChecks(org.apache.lucene.search.Query query, QueryCreationContext queryCreationContext) Deprecated, for removal: This API element is subject to removal in a future version.Takes a worklog index query and adds some necessary permission checks to it.
-
Field Details
-
matchNoDocsQuery
public static final org.apache.lucene.search.BooleanQuery matchNoDocsQueryDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
QueryProjectRoleAndGroupPermissionsDecorator
public QueryProjectRoleAndGroupPermissionsDecorator(PermissionManager permissionManager, ProjectRoleManager projectRoleManager) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
appendPermissionFilterQuery
public org.apache.lucene.search.Query appendPermissionFilterQuery(org.apache.lucene.search.Query query, QueryCreationContext queryCreationContext, String groupLevelField, String roleLevelField) Deprecated, for removal: This API element is subject to removal in a future version.Append the permission query to the passed query.- Parameters:
queryCreationContext- the context of query creationgroupLevelField- the name of the lucene document field which represents the group level visibilityroleLevelField- the name of the lucene document field which represents the role level visibility- Returns:
- the lucene query combined from passed query and permission query
-
decorateWorklogQueryWithPermissionChecks
public org.apache.lucene.search.Query decorateWorklogQueryWithPermissionChecks(org.apache.lucene.search.Query query, QueryCreationContext queryCreationContext) Deprecated, for removal: This API element is subject to removal in a future version.Takes a worklog index query and adds some necessary permission checks to it.- Parameters:
query- worklog queryqueryCreationContext- query context- Returns:
- a new query with permission checks added
-
createPermissionQuery
public org.apache.lucene.search.Query createPermissionQuery(QueryCreationContext queryCreationContext, String groupLevelField, String roleLevelField) Deprecated, for removal: This API element is subject to removal in a future version.Creates the lucene query that will restrict the results to only elements that are visible to the user based on the query creation context and elements' group and role visibility levels.- Parameters:
queryCreationContext- the context of query creationgroupLevelField- the name of the lucene document field which represents the group level visibilityroleLevelField- the name of the lucene document field which represents the role level visibility- Returns:
- the query with all conditions to filter restricted items. Return empty BooleanQuery if user has no rights to see any project. Return MatchAllDocsQuery query if security is overriden
-
ProjectRoleAndGroupPermissionsQueryDecoratorinstead.