3.0.0
Added
c:LetMe.Policy.fetch_expression/1c:LetMe.Policy.fetch_expression!/1c:LetMe.Policy.get_expression/1
Changed
- The expressions, evaluation logic, and optimization logic introduced in
LetMe 2.0.0 were extracted into a separate library calledSpek. This version
replaces the expression structs and logic with the new library.
How to upgrade
The DSL and callback functions are unchanged compared to version 2.0.0. Only
the representation of expressions under the expression key in the
LetMe.Rule and LetMe.UnauthorizedError structs was changed to use the
Spek structs.
LetMe.AllOf->Spek.AllOfLetMe.AnyOf->Spek.AnyOfLetMe.Check->Spek.CheckLetMe.Literal->Spek.LiteralLetMe.Not->Spek.Not
The structs have mostly the same structure, except for these differences:
- All structs:
passed?->satisfied? Spek.Literal: additionalresultkeySpek.Check:name->fun- additional
modulekey, which contains the name of the check module. arg->args- Because of the way Spek maps the evaluation context to function arguments,
theargskey holds a list in the format
[{:ctx, :subject}, {:ctx, :object}, arg], whereargis the value that
was previously under theargkey.