Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41347

Worksite Setup > View: Softly Deleted Sites > Display "Delete" button conditionally based on permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 11.4, 12.5, 19.0, 20.0
    • Fix Version/s: 20.0
    • Component/s: Worksite Setup
    • Labels:
      None
    • 19 status:
      Verified
    • Test Plan:
      Hide

      As admin, ensure the user.template.registered realm template allows your user both site.del and site.del.softly.deleted permissions.

      1. Create a site
      2. Go to Worksite Setup, select the site from the list and select "Delete"
      3. Still in Worksite Site, change the "View" drop down to "Softly Deleted Sites", then click the "Apply View and Term" button
      4. Verify the site appears in the list, and that the "Delete" button is present (also possibly the "Restore" button, if the user is granted this permission)
      5. Select the site from the list and click the "Delete" button
      6. Verify the site was deleted as expected
      7. As admin, remove the site.del.softly.deleted permission in the appropriate realm template
      8. Repeat steps 1-3
      9. Verify the site appears in the list, and that the "Delete" button is no longer present on the form
      Show
      As admin, ensure the user.template.registered realm template allows your user both site.del and site.del.softly.deleted permissions. Create a site Go to Worksite Setup, select the site from the list and select "Delete" Still in Worksite Site, change the "View" drop down to "Softly Deleted Sites", then click the "Apply View and Term" button Verify the site appears in the list, and that the "Delete" button is present (also possibly the "Restore" button, if the user is granted this permission) Select the site from the list and click the "Delete" button Verify the site was deleted as expected As admin, remove the site.del.softly.deleted permission in the appropriate realm template Repeat steps 1-3 Verify the site appears in the list, and that the "Delete" button is no longer present on the form

      Description

      The permission "site.del" determines if a user can softly delete a site, and the permission "site.del.softly.deleted" determines if a user can hard delete a previously softly deleted site.

      However when a user is in the "View: Softly Deleted Sites" UI, the "Delete" button is present regardless of if the user has the "site.del.softly.deleted" permission. If the user lacks this permission, makes some selections from the table and selects "Delete", they will be presented with an error message indicating they don't have the necessary permissions to perform the action.

      The linked PR introduces more logic to conditionally render the (hard) "Delete" button in the "View: Softly Deleted Sites" UI.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  bjones86 Brian Jones
                  Reporter:
                  bjones86 Brian Jones
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration