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

Computed fields display errors when the last document author has not the script right

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:

      1. Create a class: Main.MyClass
      2. Add 2 string properties: firstName and lastName
      3. Add a computed field fullName, in the script field, put:
      {{velocity}}
      $object.display('firstName', 'view') $object.display('lastName', 'view')
      {{/velocity}}
      
      1. Create a sheet for that class, and add the ClassSheetBinding
      2. With the Administrator, create a page with an object of Main.MyClass
      3. Verify the sheet is correctly displayed
      4. With an other user, who has not the script right, edit the page and change the last name for example. Save
      5. The computed field is not displayed anymore:

      I would expect it to work, because the script is executed by the sheet which has been saved by the administrator.

      Moreover, if you put the exact same code of the displayer in the sheet, it will works, whoever saved the document last. So it's not consistent.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                gdelhumeau Guillaume Delhumeau
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

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