Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge has_user_access?/4 args and pass entire object to has_user_access?/3 #19

Closed
4 tasks
rschef opened this issue Nov 7, 2019 · 0 comments · Fixed by #20
Closed
4 tasks

Merge has_user_access?/4 args and pass entire object to has_user_access?/3 #19

rschef opened this issue Nov 7, 2019 · 0 comments · Fixed by #20

Comments

@rschef
Copy link
Collaborator

rschef commented Nov 7, 2019

Closes #19

Current callback:

@callback has_user_access?(
    current_user,
    scope :: module(),
    {field :: any(), field_value :: any()},
    rule :: any()
  ) :: 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
@rschef rschef changed the title Merge has_user_access?/4 args Merge has_user_access?/4 args and pass entire object to has_user_access?/3 Nov 7, 2019
@rschef rschef closed this as completed in #20 Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant