Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9386

Unable to run Solr queries without PR

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 9.0-rc-1
    • Component/s: Query, Search - Solr
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      While trying to execute a Solr query without PR, I have noticed this exception:

      org.xwiki.query.QueryException: Query languages others than XWQL or HQL require programming right. Query statement = [not important]
      

      Looking at the code, it seems that indeed we have this check in SecureQueryExecutorManager#execute().

      This is bad, IMO, because it would require every extension that adds a new query language to have PR in order to use it.

      We should either:

      • let rights check be handled by each QueryExecutor
      • have a common results interface for which rights can be checked in the upper level (like in SecureQueryExecutorManager)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: