Uploaded image for project: 'Nuxeo Web UI'
  1. Nuxeo Web UI
  2. WEBUI-864

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: UI
    • Backlog priority:
      400
    • Upgrade notes:
      Hide

      After analyzing the ticket we found that changes were required only in "Element" and "UI-Element".

      Show
      After analyzing the ticket we found that changes were required only in "Element" and "UI-Element".
    • Sprint:
      UI - 2022-8

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: