Skip to content

Releases: woylie/let_me

1.2.4

22 Apr 22:28
f5b8ac6
Compare
Choose a tag to compare

Fixed

  • Nested lists within structs resulted in a CaseClauseError during redaction.

1.2.3

11 Nov 05:40
a94332e
Compare
Choose a tag to compare

Changed

  • Updated documentation.

1.2.2

28 Jun 08:50
46f0f4c
Compare
Choose a tag to compare

Changed

  • You can now override the exception message used by
    c:LetMe.Policy.authorize!/4 (e.g.
    use LetMe.Policy, error_message: "Not today, chap.").

1.2.1

27 Jun 16:23
ccfa210
Compare
Choose a tag to compare

Changed

  • Define action type when you use LetMe.Policy.
  • Add type specifications for generated authorize functions.

1.2.0

19 Jun 14:03
946a9df
Compare
Choose a tag to compare

Added

  • Added an optional opts argument to the authorize functions, so that additional options can be passed to pre-hooks.
  • Updated LetMe.filter_rules/2 to allow filtering by meta data.

Changed

  • Pre-hook options are now expected to be passed as a keyword list.

Fixed

  • Fix deprecation warning about Logger.warn/2 in Elixir 1.15.

1.1.0

07 May 21:29
0693a08
Compare
Choose a tag to compare

Added

  • Added a metadata macro to add metadata to actions. The metadata can be read from the LetMe.Rule struct.

1.0.3

20 Mar 23:59
adf9e37
Compare
Choose a tag to compare

Changed

  • Update ex_doc and other dev dependencies.

1.0.2

05 Jan 13:01
Compare
Choose a tag to compare

Added

  • Added a cheat sheet for rules and checks.

Fixed

  • Fixed a code example for rule introspection in the readme.

1.0.1

06 Nov 15:21
Compare
Choose a tag to compare

Changed

  • Use Keyword.pop/3 with default value instead of Keyword.pop!/2, so that
    you can pass options to LetMe.redact/3 without passing the redact_value
    option.

1.0.0

06 Nov 14:43
22abb32
Compare
Choose a tag to compare

Added

  • Added c:LetMe.Policy.filter_allowed_actions/3 and
    LetMe.filter_allowed_actions/4.
  • Added c:LetMe.Policy.get_object_name/1.

Changed

  • Renamed c:LetMe.Policy.authorized?/3 to c:LetMe.Policy.authorize?/3,
    because consistency is more important than grammar, maybe.
  • The c:LetMe.Schema.scope/2 callback was removed in favour of
    c:LetMe.Schema.scope/3. The __using__ macro defined default
    implementations for both functions that returned the given query unchanged, in
    case you only needed the redact callback of the behaviour. In practice, this
    made it all too easy to call the 2-arity version when only the 3-arity
    version was defined, and vice versa, which would lead the query to not be
    scoped. So in order to reduce the room for error at the cost of a minor
    inconvenience, you will now always need to implement the 3-arity function,
    even if you don't need the third argument.
  • Changed c:LetMe.Schema.redacted_fields/2 to
    c:LetMe.Schema.redacted_fields/3 to allow passing additional options, and to
    be consistent with c:LetMe.Schema.scope/3.