Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #5761 to 3.x #5763

Merged
merged 4 commits into from
Jun 30, 2022
Merged

Backport #5761 to 3.x #5763

merged 4 commits into from
Jun 30, 2022

Commits on Jun 29, 2022

  1. add ACL key handling for Hyrax::Group

    knowledge about how the ACL keys are handled for Groups is spread throughout the
    codebase. treating this information as an attribute on the group seems cleaner.
    
    `Hyrax::Group#user_key` is provided for easy compatibility with `::User`.
    tamsin johnson authored and marrus-sh committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    040c78d View commit details
    Browse the repository at this point in the history
  2. implement equality for Hyrax::Group

    tamsin johnson authored and marrus-sh committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    1d87046 View commit details
    Browse the repository at this point in the history
  3. Add specs for Hyrax::Group

    Also fixes an incorrect implementation of `Hyrax::Group.from_key`.
    
    The Sipity specs were inspired by the similar specs for `Hyrax::User`.
    marrus-sh committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    29e1f68 View commit details
    Browse the repository at this point in the history
  4. Add #agent_key & .from_agent_key to Group & User

    These methods help reduce the amount of knowledge that ACLs require
    regarding agents.
    
    For Users, the default implementation is just to use `#user_key` and
    `User.find_by_user_key`.
    
    (An alternate approach would be just to implement `#user_key` and
    `.find_by_user_key` directly on `Hyrax::Group`, but I’m not sure we
    want Groups to be treatable as Users in all contexts where `#user_key`
    might be used.)
    marrus-sh committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    954785f View commit details
    Browse the repository at this point in the history