Permissions Architecture: Courses error when trying to delete location in BugFest

Description

Overview:
Steps to Reproduce:

  1. Log into https://bugfest-honeysuckle.folio.ebsco.com/ or snapshot as user with only these permissions:

    1. "Settings (tenant): Can create, edit and remove locations"

    2. "Inventory: View instances, holdings, and items"

  2. (you can use cboerema/Foli)test1)

  3. Go to Settings > Tenant > Locations

  4. Drill down to UC/HP/Eck/EMedia

  5. Attempt to delete the location

Expected: Deletion should happen without error if the location is not in use

Actual: Error

Additional Information:

  • This didn't repro in our scratch environment where Courses isn't enabled

URL:

Interested parties:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

4

Checklist

hide

TestRail: Results

Activity

Show:

Cate Boerema December 14, 2020 at 4:29 PM

Ah, okay. Thanks for clarifying .

the consensus was that it's better to make it possible to break Course Reserves than to require it to be a part of the FOLIO Core

In that case, I will mark this closed > done

Mike Taylor December 14, 2020 at 1:10 PM

the behaviour you are describing is precisely what happens when no check is made for locations in use by Course Reserves. It's the bug I fixed in https://github.com/folio-org/ui-tenant-settings/commit/3f3727a9cd86ac64a3fe498a9e7da9ab0e9b5d40

But making this test causes the side-effects described in the present issue, and the consensus was that it's better to make it possible to break Course Reserves than to require it to be a part of the FOLIO Core.

Cate Boerema December 14, 2020 at 12:33 PM

, I tested this in snapshot and I no longer get an error when deleting a location as a limited-permission user. However, I did notice that, when the location has been selected in the Courses app and you try to delete it, it just deletes. Is that intended? For other types of records (e.g. Inventory records), FOLIO won't let you delete locations that are "in use". This is the popup you get if you try to delete such a location:

Maybe it's okay if a location that's in use in Courses is deleted. I mean, Location doesn't seem to be a required field in the Courses record. I did notice, though, that after I deleted the in-use location in Courses, it left behind a weird UUID reference in the Courses UI:

Also, I tested this same workflow in Honeysuckle BugFest and, in that environment, FOLIO did prevent deletion of the location when in use in Courses:

So this is a change in behavior. I just wanted to make sure everyone was aware and okay with that.

Steps to repro:

  1. Go to Locations and add a new location

  2. Go to Courses and create a new course and select new location as the Location

  3. Go back to Locations and delete the new location

Outcome in Honeysuckle: FOLIO disallows deletion

Outcome in Snapshot: FOLIO allows deletion and the Courses record is left with a reference to a UUID

FYI (Courses PO) and (Locations PO)

Craig McNally December 8, 2020 at 1:48 PM

I reserve the right be unhelpfully grumpy

This should be part of the programmers bill of rights.

Mike Taylor December 8, 2020 at 11:49 AM

Yes; but I reserve the right be unhelpfully grumpy about it.

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Prokopovych

Release

R1 2021

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created October 29, 2020 at 1:43 PM
Updated March 17, 2021 at 6:52 PM
Resolved December 14, 2020 at 4:29 PM
TestRail: Cases
TestRail: Runs