== Version 1.0.0beta1
- Initial version
== Version 1.0.0rc1
- Fix bug where user can't check on class
- Adding new clause: cant_all
== Version 1.0.0rc2
- Fix bug when class's name, as a constant, is reloaded (re-allocated to different address in the memory)
- Allow describing rule for
nil, useful if user is not authenticated thus role is probablynil - Remove pry from development dependency
== Version 1.0.0rc3
- Each target class should includes
Bali::Objector, for the following reasons:- Makes it clear that class do want to include the Bali::Objector
- Transparant, and thus less confusing as to where "can?" and "cant" come from
- When ruby re-parse the class's codes for any reasons, parser will be for sure include Bali::Objector
- Return
trueto anycan?for undefined target/subtarget alike - Return
falseto anycant?for undefined target/subtarget alike
== Version 1.0.0
- Released the stable version of this gem
== Version 1.1.0rc1
- Ability for rule class to be parsed later by passing
later: trueto rule class definition - Add
Bali.parseandBali.parse!(Bali.parse!executes "later"-tagged rule class, Bali.parse executes automatically after all rules are defined) - Added more thorough testing specs
- Proc can be served under
unlessfor defining the rule's decider
== Version 1.1.0rc2
- Ability to check
can?andcant?for subtarget with multiple roles - Describe multiple rules at once for multiple subtarget
== Version 1.2.0
- Passing real object as subtarget's role, instead of symbol or array of symbol
- Clause can also yielding user, along with the object in question
== Version 2.0.0rc1
Bali::AuthorizationErrorsubclass ofStandardErrortailored for raising error regarding with authorisation- new objectors
can!andcannot!to raise error on inappropriate access
== Version 2.0.0
- Release!
== Version 2.1.0
othersblock would allow for rule definitions within it to be applied for all undefined subtargets of a target- Fixing bug when roles_for of a user object retrieves
nilas the user's role, it won't acknowledge that the user is indeed havingnil-role and raising an error instead. - Inherits rules by passing
:inheritsoption when definingrules_for clear_ruleswithindescribeorothersblock to remove all inherited rules (or any rules previously defined) for that subtarget- Adding
Bali::Printerthat would enable for rules to be printed by calling.pretty_printon it
== Version 2.1.1
- Bug fixes on
clear_ruleswhich it clear rules defined inotherseven when not asked to - Bug fixes on
Bali::Printerwhere inherited rules print the wrong target class due to another bug in an internal file (but doesn't hamper rules-checking logic)
== Version 2.1.2
nilwill be printed when objecting with can! or cannot! for better readability.- 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.
== Version 2.2.0
- Deprecating
describeblock in favour ofroleblock,describeis to be deprecated in version 3.0. - Using strategy pattern, heavy refactoring
- Human-readable authorisation error message when invoking !-version of can/cannot, for eg: Role general_user is not allowed to perform operation
updateon My::Transaction
== Version 2.4.0 (March 1, 2016)
- rules_for accepting String instead of consanttised class name, in case the class is not yet loaded
== Version 6.0.0rc1 (Apr 26, 2020)
- Integration with Rails is expected
- Removed bang methods:
can!,cannot!.can?andcant?should be enough. User can raise an error by themselves as necessary. - Change back from
cannottocant - Removing:
Bali.map_rulesand its auxiliary functions - Use class for defining rules
- Hook to ActiveModel without having to include
Bali::Authorizer
== Version 6.0.0rc2 (Apr 27, 2020)
- Hook into ActionView and ActionController
- Not storing the ruler class inside a
RULE_CLASS_MAPto avoid caching it - Not storing the role field mapper inside a
TRANSLATED_SUBTARGET_ROLES
== Version 6.0.0rc3 (May 01, 2020)
- Built-in
be_able_tomatcher for RSpec - Renaming
Bali::Printer.pretty_printtoBali::Printer.printable - Uniform
can?andcant?authorizization checker - Adding
scopeblock
== Version 6.0.0
- Bug fix for
can?andcant?when passing 2 arguments.
== Version 6.0.1
- Bug fix for judgement issue when the user's role is an empty array