Add a generic interface for ACL keys to Group and User #5761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resumes work on #5439.
Adds a full set of tests for
Hyrax::Group
, and adds#agent_key
and.from_agent_key
as new methods onHyrax::Group
and[Hyrax::]User
. In the latter case, these just fall back to#user_key
andUser.find_by_user_key
.The
#to_sipity_agent
tests onHyrax::Group
were mostly copied from the ones onHyrax::User
, and may warrant a closer look by someone more familiar with what they should be testing.(If adding methods on
User
is undesirable, we could either ⓐ fallback to the existing#user_key
andUser.find_by_user_key
if#agent_key
and.from_agent_key
are not defined, or ⓑ just implement#user_key
and.find_by_user_key
onHyrax::Group
directly. I’d probably prefer the first option, but neither of these solutions felt ideal to me.)I’ll open a PR to backport this to
3.x-stable
if this gets merged, as we would like it for our current experimental work on ahyrax-acl
gem.@samvera/hyrax-code-reviewers