Action Policy v0.5.0 Release Notes
Release Date: 2020-09-29 // over 3 years ago-
🚀 This release includes a bunch of minor features and improvements based on the community requests and suggestions.
🔋 Features
- ➕ Added
Result#all_details
to return all collected details in a single hash.
👀 See #130 for some example use cases.
Added
default:
option to the.lookup
method anddefault_authorization_policy_class
callback to behaviours.👌 Add
skip_verify_authorized!
to Rails controllers integration.This method allows you to skip the
verify_authorized
callback dynamically.- ➕ Added
allowance_to
method to authorization behaviours.
This method is similar to
allowed_to?
but returns an authorization result object.🔄 Changes
- The
deny!
andallow!
methods are now parts of the core API.
Now you can call
deny!
andallow!
in policy rules to fail- or pass-fast.💥 BREAKING. Pre-check name is no longer added automatically to failure reasons. You should specify the reason
explicitly:deny!(:my_reason)
.- 👍 Rule aliases are now supported in
allowed_to?
/check?
calls within policies.
Misc
- ⬇️ Dropped Ruby 2.4 support.
- ➕ Added