- Fix compatibility with Rails 6.0 and Zeitwerk (PR #53), thanks dmorehouse!
- Expose
applicable_roles
method on the policy instance. This allows insight into what roles actually apply to a given user.
- Add information about action and subject when raising AccessDenied exception (PR #46), thanks jraqula!
- Drop support for Ruby 1.9.3, it might still work but we are no longer testing against it.
- Start testing against Rubies 2.3-2.5 in CI
- Move Rails integration into Railties, this fixes some load order issues (PR #45), thanks jraqula!
-
Cache whole blocks of identical permissions when one of them is checked. For example, assuming we have a given permissions set:
can [:update, :destroy, :archive], Post do |post, user| post.user_id == user.id end
When resolving one of them like this:
can? :update, @post
Access Granted will cache the result for each of the remaining actions, too. So next time when checking permissions
:destroy
or:archive
, AG will serve the result from cache instead of running the block again.
- Expose internal
block
instance variable in Permission class
- Return detailed information about which permission is duplicate when raising DuplicatePermission exception