Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22991

Fix sharing a document via Date Based Permissions for the future date range

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Sharing a document with pemissions based on future date ranges works
    • Backlog priority:
      900
    • Sprint:
      nxfit 9.3.6
    • Story Points:
      5

      Description

      Couldn't share a private document with another user using Date Based permissions.

      User story:
      You have two users.
      First user has a document that is not visible for the second one.
      First user wants to share the document by applying READ permissions for the date range in future. For instance today is August 26th, the user wants to give Read permissions from September 1st till September 9th.

      Additional comments:
      Tried apply permissions only for Collection type. Server: Vanila 8.10-HF13

      javax.el.ELException: /widgets/listing/listing_title_link_widget_template.xhtml: Privilege 'Read' is not granted to 'User'
      	at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:96)
      	at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
      	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
      	at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeChildren(OutputLinkRenderer.java:124)
      	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
      	at org.nuxeo.ecm.platform.ui.web.component.document.RestDocumentLink.encodeChildren(RestDocumentLink.java:593)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
      	at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:104)
      	at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:621)
      	at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:1110)}}
      

      Steps to reproduce:
      Conditions - two or more users available in the system. (We had an Administrator and a custom user).
      1. Administrator creates a document.
      2. Only Administrator has permissions to view the document.
      3. In the document content view go to Permissions tab
      4. Press New button at Permissions Defined Locally
      5. Select the second user
      6. Select any type of Rights available (Read, Write, etc)
      7. Set Date Based timeframe range within anytime in the future.
      8. Press create.
      9. Login under that second user.
      10. Add User2 to members so that the folder content is readable
      11. Navigate to the folder where the shared document should be.

      When trying to reach the containing folder you will see an exception like the mentioned above.

      Now remove the date based permission and observe the folder content is visible.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d