Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1255

Fix display of the Delete button on a document when missing permission on the parent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0
    • Fix Version/s: HOTFIX_10.10_2.4, 3.0.x
    • Component/s: Actions

      Description

      The Delete icon/button is displayed on the current document if the current user has the Remove permission.

      However to be able to delete a document, one needs the Remove permission on the current document but also the RemoveChildren permission on the parent.

      So a second test on the parent must be added to the isAvailable method at https://github.com/nuxeo/nuxeo-ui-elements/blob/maintenance-2.4.x/actions/nuxeo-delete-document-button.html#L117

      It would probably require that the permissions are computed for the first accessible parent.

       

       PS : the code of this method for master is different and is testing "Write", which is not good: https://github.com/nuxeo/nuxeo-ui-elements/blob/master/actions/nuxeo-delete-document-button.js#L114

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tmartins Thierry Martins
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d