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.
since 10.5 because it's Lucene specific. Use the Lucene-agnostic ProjectRoleAndGroupPermissionsQueryDecorator instead.
A component that can add project role and group permission checks to lucene queries.
Since:
v6.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.lucene.search.BooleanQuery
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • matchNoDocsQuery

      public static final org.apache.lucene.search.BooleanQuery matchNoDocsQuery
      Deprecated, 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 creation
      groupLevelField - the name of the lucene document field which represents the group level visibility
      roleLevelField - 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 query
      queryCreationContext - 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 creation
      groupLevelField - the name of the lucene document field which represents the group level visibility
      roleLevelField - 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