Repository navigation
Releases
Releases · brownboxdev/rabarber-authorization
v6.0.3
v6.0.2
v6.0.1
Bugs:
- Fixed role management methods raising
NameErrorwhen the configured user model is not namedUser - Fixed a race condition where outdated roles could remain cached after being changed
- Fixed role creation and renaming raising
ActiveRecord::RecordNotUniqueinstead of returningfalsewhen called concurrently - Fixed uniqueness of global and class context roles not being enforced at the database level
This release is fully backward compatible: existing applications continue to work as before without any changes. The new indexes only apply to new applications installing Rabarber. To get the same database-level protection in an existing application, run the following optional migration if your database supports partial indexes:
add_index :rabarber_roles, :name, unique: true, where: "context_type IS NULL AND context_id IS NULL"
add_index :rabarber_roles, [:name, :context_type], unique: true, where: "context_type IS NOT NULL AND context_id IS NULL"On databases without partial index support, such as MySQL, uniqueness of global and class context roles remains, for now, enforced at the application level only.
Misc:
Rabarber.prunenow clears the role cache
v6.0.0
Breaking:
- Removed methods deprecated in v5.2.0 from the public API
- Dropped support for Ruby 3.2
- Dropped support for Rails 7.1
Bugs:
- Fixed cache clearing not working with Memcached
Misc:
- Optimized cache key generation
- Dropped some unnecessary dependencies
To upgrade to v6.0.0, please refer to the migration guide
v5.2.5
v5.2.4
v5.2.3
v5.2.2
v5.2.1
v5.2.0
Features:
- Added
Rabarber.prunemethod to allow manual pruning of roles with deleted contexts
Misc:
revoke_all_rolesnow returns an empty array instead ofnilfor consistency with other role assignment methods- Deprecated the following role management methods in favor of new counterparts:
Rabarber::Role.names->Rabarber.rolesRabarber::Role.all_names->Rabarber.all_rolesRabarber::Role.add->Rabarber.create_roleRabarber::Role.rename->Rabarber.rename_roleRabarber::Role.remove->Rabarber.delete_roleRabarber::Role.assignees->User.with_role