Action Policy v0.5.0 Release Notes

Release Date: 2020-09-29 // about 2 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 and default_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! and allow! methods are now parts of the core API.

    Now you can call deny! and allow! 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.


    • โฌ‡๏ธ Dropped Ruby 2.4 support.