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

Pages based on sheets with HQL Select-Statements need to be saved with administration-rights

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 3.4
    • Velocity
    • xwiki hosted on linux with tomcat 6.
      Browsers: Firefox, IE
    • velocity, sheets, hql, sql, rights
    • Unknown
    • N/A
    • N/A

    Description

      We got some strange behaviour when creating new pages based on a sheet that contains velocity-scripts with some hql-queries. New pages based on the sheet can be created by every user and nearly everything works fine, just the results of the select-statements doesn't show up. Seems that an empty resultset is returned. When storing the newly created page with admin-rights everything (including the queries) works fine.

      Parts of the code with the query:

      #set($sql = "select doc.fullName, doc.name from XWikiDocument as doc where (doc.hidden <> true or doc.hidden is null) and doc.space='${doc.space}' and doc.content like '%$doc.name%' order by doc.name asc")
      #set($results=$xwiki.search($sql))
      #if ($results.size() > 0)

      ... -> is empty when the page based on this sheet is saved without admin-rights

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            hurz Matthias Wegerhoff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: