-
Notifications
You must be signed in to change notification settings - Fork 48
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
Groups with Roles feature #1859
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 13, 2022
Introduce ability to add roles to groups. Group members inherit the permissions attached to the group's roles. Notable changes: - Several new Roles for Work, Collection, and User management - Role permission integration with Hyrax permission logic (Sipity, access controls, CanCan, etc.) - Hyku::Group replaced with already existing Hyrax::Group - Easily assign roles to individual users - Extended UI - Both pre-configured and customizable groups - Scripts to migrate existing Hyku applications - More This work is a joint contribution of PALNI and PALCI's Hyku for Consortia project.
bkiahstroud
force-pushed
the
groups-with-roles-feature
branch
from
December 14, 2022 00:04
1ba52f5
to
a36e90b
Compare
1 task
has_model_ssim is required to be in the permissions request handler for the Groups with Roles feature to work properly. Without it, CanCan rules for Strings won't work. Found when running the spec/abilities/collection_ability_spec.rb
… set by default Found when running spec/features/admin_set_form_participants_tab_spec.rb
* run rubocop autocorrect * fix metrics/linelength line is too long * linelength, rubocop.yml, rails logger & time fixes * linelength, rubocop.yml fixes * Update app/services/roles_service.rb breaks conditional for if...end statement Co-authored-by: Benjamin Kiah Stroud <[email protected]> * Update app/services/roles_service.rb make a more ideal breaking point Co-authored-by: Benjamin Kiah Stroud <[email protected]> * Update app/controllers/admin/group_roles_controller.rb change to a more ideal breaking point Co-authored-by: Benjamin Kiah Stroud <[email protected]> * fix metric/linelength cop * fix metrics/linelength cop * fix metrlics/linelength cop * fix metric/linelength cop * fix metrics/linelength offenses * more rubocop fixes in app/models dir * rubocop RSpec/LetSetup fixes * rubocop RSpec/RepeatedDescription fixes * rubocop RSpec/ExampleLength fixes * rubocop RSpec/ScatteredSetup and RSpec/ExpectInHook fixes * misc rubocop fixes * update rubocop TODO file * the last melon Co-authored-by: Benjamin Kiah Stroud <[email protected]> Co-authored-by: Benjamin Kiah Stroud <[email protected]>
Introduce ability to add roles to groups. Group members inherit the permissions attached to the group's roles. Notable changes: - Several new Roles for Work, Collection, and User management - Role permission integration with Hyrax permission logic (Sipity, access controls, CanCan, etc.) - Hyku::Group replaced with already existing Hyrax::Group - Easily assign roles to individual users - Extended UI - Both pre-configured and customizable groups - Scripts to migrate existing Hyku applications - More This work is a joint contribution of PALNI and PALCI's Hyku for Consortia project.
has_model_ssim is required to be in the permissions request handler for the Groups with Roles feature to work properly. Without it, CanCan rules for Strings won't work. Found when running the spec/abilities/collection_ability_spec.rb
… set by default Found when running spec/features/admin_set_form_participants_tab_spec.rb
* run rubocop autocorrect * fix metrics/linelength line is too long * linelength, rubocop.yml, rails logger & time fixes * linelength, rubocop.yml fixes * Update app/services/roles_service.rb breaks conditional for if...end statement Co-authored-by: Benjamin Kiah Stroud <[email protected]> * Update app/services/roles_service.rb make a more ideal breaking point Co-authored-by: Benjamin Kiah Stroud <[email protected]> * Update app/controllers/admin/group_roles_controller.rb change to a more ideal breaking point Co-authored-by: Benjamin Kiah Stroud <[email protected]> * fix metric/linelength cop * fix metrics/linelength cop * fix metrlics/linelength cop * fix metric/linelength cop * fix metrics/linelength offenses * more rubocop fixes in app/models dir * rubocop RSpec/LetSetup fixes * rubocop RSpec/RepeatedDescription fixes * rubocop RSpec/ExampleLength fixes * rubocop RSpec/ScatteredSetup and RSpec/ExpectInHook fixes * misc rubocop fixes * update rubocop TODO file * the last melon Co-authored-by: Benjamin Kiah Stroud <[email protected]> Co-authored-by: Benjamin Kiah Stroud <[email protected]>
bkiahstroud
force-pushed
the
groups-with-roles-feature
branch
from
January 4, 2023 18:33
a906db4
to
9af33e7
Compare
…nto groups-with-roles-feature
The MakeSureUsersHaveGroups migration was throwing errors when running on an existing Hyku application that already had data. Instead of making data changes in a migration (which is not best practice), replace it with a rake task that can be run when upgrading an existing app. Also, rework User#add_default_group_memberships! to not: 1) run every time a user is saved 2) add users with the admin role to the admin group Neither of those things are necessary. The new rake task takes care of updating existing admin users, and new tenants will always add admins to their admin group because of CreateAccount#add_initial_users
Fixes a bug where the Depositors and Editors groups were not being granted their Workflow Roles, thus causing lots of issues (e.g. editors not being able to review pending works)
1 task
7 tasks
orangewolf
requested changes
Jan 25, 2023
app/views/hyrax/admin/admin_sets/_form_participant_table.html.erb
Outdated
Show resolved
Hide resolved
app/controllers/hyrax/admin/collection_type_participants_controller.rb
Outdated
Show resolved
Hide resolved
app/views/hyrax/admin/collection_types/_form_participants.html.erb
Outdated
Show resolved
Hide resolved
Co-authored-by: Jeremy Friesen <[email protected]> Co-authored-by: Steven McFarlane <[email protected]>
6 tasks
* rubocop fixes * remove commented code * keep "has_" prefix for clarity --------- Co-authored-by: Benjamin Kiah Stroud <[email protected]>
* Add translations nd the corresponding languages * Addresses readbility of the code
orangewolf
approved these changes
Feb 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduce ability to add roles to groups. Group members inherit the
permissions attached to the group's roles.
Notable changes:
access controls, CanCan, etc.)
This work is a joint contribution of PALNI and PALCI's Hyku for Consortia project.