Permission sets - new way to manage role-based permissions
This patch release contains several fixes and a nice new feature Permission Sets a new way to customize role-based permissions in Spree. Permission Sets provide a clean, modular way to manage permissions. Each permission set is a reusable group of permissions that can be assigned to roles.
Old customizations will work as before. To switch to the new system you'll need to add below lines to your config/initializers/spree.rb file:
Rails.application.config.after_initialize do
Spree.permissions.assign(:default, [Spree::PermissionSets::DefaultCustomer])
Spree.permissions.assign(:admin, [Spree::PermissionSets::SuperUser])
endTo update your Spree version please run:
bundle updatein your project root directory. If you're on Spree 5.1 or older, please follow Spree 5.2 upgrade guide.
Other changes
Core
- fix: update state_machines by @seuros in #13331
- Fix re-using slugs from history on the same record by @mad-eel in #13329
Admin Dashboard
- Add
portal: falseto dropdowns inside turbo frames or referencing D… by @damianlegawiec in #13335 - Fix drawer overflow form scroll by @dimidev in #13334
Documentation
- New documentation website with Spree tutorial by @damianlegawiec in #13304
- Updated 'Pages' user documentation by @jaburghes in #13316
- Docs: fix typo (bellow → below) in developing Spree guide by @kunalchaudhari in #13317
- Fix broken Customization Overview link by updating to Customization Quickstart page by @kunalchaudhari in #13322
- [Skip CI] Document new permission sets by @damianlegawiec in #13325
New Contributors
- @kunalchaudhari made their first contribution in #13317
Full Changelog: v5.2.0...v5.2.1