Skip to content

v3.0.0

Latest

Choose a tag to compare

@enjaku4 enjaku4 released this 23 Nov 20:40
· 3 commits to main since this release

Breaking

  • Dropped support for Rails 8.0 and earlier
  • Dropped support for Ruby 3.2
  • Changed user_agent column in veri_sessions table from string to text
  • Renamed account locking to suspension
  • Added algorithm markers to stored password hashes
  • update_password now terminates all sessions of the user by default
  • The tenant is now passed to log_in and current_tenant returns the tenant of the current session
  • Models used as tenants must now be declared with veri_tenant

Features

  • Added veri_tenant to declare tenant models and delete their sessions when they are destroyed
  • Added shapeshifter_sessions association to fetch the sessions in which a user is impersonating someone
  • Added Veri::Session.from_request method to fetch the session from a request object
  • Added Veri::Session.shapeshifted to fetch impersonating sessions
  • Added Veri::Session.in_original_tenant to fetch impersonating sessions that return to a tenant
  • Added support for binary UUID primary keys in MySQL

Bugs

  • Fixed Rails commands failing when the user model cannot be loaded
  • Fixed migration helpers raising when the tenant has no sessions, which broke migrations on fresh databases
  • Fixed true_tenant returning the impersonated tenant when the impersonator had no tenant
  • Fixed the generated migration failing when the user table's primary key is not id
  • Fixed the generated migration not working with UUID primary keys on some databases

Misc

  • The generator now takes the primary key type from the existing user table, making --uuid unnecessary

To upgrade to v3.0.0, please refer to the migration guide