Permissions Architecture: Courses error when trying to delete location in BugFest
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
Checklist
hideTestRail: Results
Activity

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:
Go to Locations and add a new location
Go to Courses and create a new course and select new location as the Location
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.
Details
Details
Assignee
Reporter

Overview:
Steps to Reproduce:
Log into https://bugfest-honeysuckle.folio.ebsco.com/ or snapshot as user with only these permissions:
"Settings (tenant): Can create, edit and remove locations"
"Inventory: View instances, holdings, and items"
(you can use cboerema/Foli)test1)
Go to Settings > Tenant > Locations
Drill down to UC/HP/Eck/EMedia
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: