Skip to content

Releases: adamnoto/bali

6.0.1

19 Aug 23:18
ec7598b
Compare
Choose a tag to compare
  1. Bug fix for judgement issue when the user's role is an empty array

2.4

01 Mar 00:28
Compare
Choose a tag to compare
2.4
  1. rules_for accepting String instead of consanttised class name, in case the class is not yet loaded

2.2.0

24 Oct 02:57
Compare
Choose a tag to compare
  1. Deprecating describe block in favour of role block, describe is to be deprecated in version 3.0.
  2. Using strategy pattern, heavy refactoring
  3. Human-readable authorisation error message when invoking !-version of can/cannot, for eg: Role general_user is not allowed to perform operation update on My::Transaction

2.1.2

06 Oct 23:06
Compare
Choose a tag to compare
  1. nil will be printed when objecting with can! or cannot! for better readability.
  2. Bug fixes on declaring multiple rules with decider. Previously, others were ignored--now, every single rule will get defined whether decider is present or not.

2.1.1

26 Sep 07:31
Compare
Choose a tag to compare
  1. Bug fixes on clear_rules which it clear rules defined in others even when not asked to
  2. Bug fixes on Bali::Printer where inherited rules print the wrong target class due to another bug in an internal file (but doesn't hamper rules-checking logic)

2.1.0

26 Sep 05:31
Compare
Choose a tag to compare

This release comprises additional features as follow:

  1. others block would allow for rule definitions within it to be applied for all undefined subtargets of a target
  2. Fixing bug when roles_for of a user object retrieves nil as the user's role, it won't acknowledge that the user is indeed having nil-role and raising an error instead.
  3. Inherits rules by passing :inherits option when defining rules_for
  4. clear_rules within describe or others block to remove all inherited rules (or any rules previously defined) for that subtarget
  5. Adding Bali::Printer that would enable for rules to be printed by calling .pretty_print on it

2.0.0

21 Sep 15:40
Compare
Choose a tag to compare

Released stable version of 2.0.0

2.0.0rc1

14 Sep 13:34
Compare
Choose a tag to compare
2.0.0rc1 Pre-release
Pre-release

This release is basically preparing for long journey ahead that Bali is envisioned with. In this release:

  1. Bali::AuthorizationError is introduced as subclass of StandardError tailored for raising error regarding with authorisation
  2. Deprecating cant, cant?, and cant_all in favor of cannot, cannot? and cannot_all
  3. New objectors can! and cannot! to raise error on inappropriate access

1.2.0

25 Aug 16:05
Compare
Choose a tag to compare
  1. Passing real object as subtarget's role, instead of symbol or array of symbol
  2. Clause can also yielding user, along with the object in question

1.1.0

24 Aug 04:12
Compare
Choose a tag to compare
  • Describe can take array
  • can/cant can take array
  • precedence