hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

Allow new applications to alter AdminSetCreateService::DEFAULT_ID while maintaing backwards compatibility

Open bwatson78 opened this issue 10 months ago • 1 comments

Descriptive summary

Allow new applications to alter AdminSetCreateService::DEFAULT_ID while maintaing backwards compatibility

Actual behavior (include screenshots if available)

Hyrax v5.0.1 has hardcoded the default admin set id as admin_set/default, which creates an incompatibility with Fedora adapter users instituting Fedora v6.5. Despite the Fedora community's attempt to allow / (forward slashes) by setting an option to do so, enabling that option doesn't fix errors that occur when attempting to save an object with the default admin set id.

Acceptance Criteria/Expected Behavior

Allow Hyrax implementers to set DEFAULT_ID to their desired value and ensure backwards compatibility by updating the default admin set's id if an instance of the AdminSet with the old id is found. This way, an instance of Hyrax knows of the old default and can replace it when Hyrax is upgraded.

bwatson78 avatar Apr 17 '24 15:04 bwatson78

I don't see a problem with moving away from using the Hyrax::AdminSetCreateService::DEFAULT_ID constant and having it always be set by the Hyrax config.

Somewhat related to this, I wonder if the complexity of this service could be reduced by using string for the valkyrie id field. I think that would allow a string like admin_set_default to be a valid id.

dlpierce avatar Apr 26 '24 12:04 dlpierce