v0.9.0
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 astruct
- Pass entire objects from field and query scope authorization to new
has_user_access?/3
- Rename
scope_by
,scope_object_by
andscope_field_by
metas toscope?
,scope_object?
andscope_field?
- Set default
scope?
value to true