Skip to content

v0.9.0

Compare
Choose a tag to compare
@rschef rschef released this 07 Nov 19:25
· 61 commits to master since this release
89c2d66

Breaking Changes

Previous Authorization.has_user_access?/4 module callback:

@callback has_user_access?(
    current_user,
    scope :: module(),
    {field :: any(), field_value :: any()},
    rule :: any()
  ) :: boolean()

New Authorization.has_user_access?/3 callback:

@callback has_user_access?(current_user, scoped_struct, rule) :: boolean()
  • Merge scope module and {field, field_value} arguments into a struct, since scope module must define a struct
  • Pass entire objects from field and query scope authorization to new has_user_access?/3
  • Rename scope_by, scope_object_by and scope_field_by metas to scope?, scope_object? and scope_field?
  • Set default scope? value to true