All Versions
Latest Version
Avg Release Cycle
49 days
Latest Release
1044 days ago

Changelog History
Page 3

  • v0.2.4 Changes

    September 06, 2018
    • ๐Ÿ”ง [Fix #39] Fix configuring cache store in Rails. ([@palkan][])

    • Add did_you_mean suggestion to UnknownRule exception. ([@palkan][])

    • โž• Add check? as an alias for allowed_to? in policies. ([@palkan][])

    • โž• Add ability to disable per-thread cache and disable it in test env by default. ([@palkan][])

    You can control per-thread cache by setting:

    ActionPolicy::PerThreadCache.enabled = true # or false
  • v0.2.3 Changes

    July 03, 2018
    • [Fix #16] Add ability to disable namespace resolution cache. ([@palkan][])

    ๐ŸŽ We cache namespaced policy resolution for better performance (it could affect performance when we look up a policy from a deeply nested module context).

    It could be disabled by setting ActionPolicy::LookupChain.namespace_cache_enabled = false. It's enabled by default unless RACK_ENV env var is specified and is not equal to "production" (e.g. when RACK_ENV=test the cache is disabled).

    When using Rails it's enabled only in production mode but could be configured through setting the config.action_policy.namespace_cache_enabled parameter.

    • ๐Ÿ“š [Fix #18] Clarify documentation around, and fix the way resolve_rule resolves rules and rule aliases when subclasses are involved. ([@brendon][])
  • v0.2.2 Changes

    July 01, 2018
    • [Fix #29] Fix loading cache middleware. ([@palkan][])

    • Use send instead of public_send to get the authorization_context so that contexts such as current_user can be private in the controller. ([@brendon][])

    • ๐Ÿ›  Fix railtie initialization for Rails < 5. ([@brendon][])

  • v0.2.1

  • v0.2.0 Changes

    June 17, 2018
    • ๐Ÿ’Ž Make action_policy JRuby-compatible. ([@palkan][])

    • โž• Add reasons.details. ([@palkan][])

    rescue_from ActionPolicy::Unauthorized do |ex|
      ex.result.reasons.details #=> { stage: [:show?] }
    • โž• Add ExecutionResult. ([@palkan][])

    ExecutionResult contains all the rule application artifacts: the result (true / false), failures reasons.

    This value is now stored in a cache (if any) instead of just the call result (true / false).

    • โž• Add Policy.identifier. ([@palkan][])
  • v0.1.4 Changes

    June 06, 2018
    • ๐Ÿ›  Fix Railtie injection hook. ([@palkan][])

    • ๐Ÿ›  Fix Ruby 2.3 compatibility. ([@palkan])

  • v0.1.3 Changes

    May 20, 2018
    • ๐Ÿ›  Fix modules order in ActionPolicy::Base. ([@ilyasgaraev][])
  • v0.1.2 Changes

    May 09, 2018
    • [Fix #6] Fix controller concern to work with API/Metal controllers. ([@palkan][])
  • v0.1.1 Changes

    April 21, 2018
    • ๐Ÿš… [Fix #2] Fix namespace lookup when Rails autoloading is involved. ([@palkan][])
  • v0.1.0 Changes

    April 17, 2018
    • ๐ŸŽ‰ Initial pre-release version. (@palkan)