Skip to content

Commit

Permalink
Fix Object Scope Authorization docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rschef committed Dec 19, 2019
1 parent 89c2d66 commit 22c550a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middlewares/object_scope_authorization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Rajska.ObjectScopeAuthorization do
valid_roles: [:user, :admin]
@impl true
def has_user_access?(%{role: :admin}, _, _scoped_struct, _rule), do: true
def has_user_access?(%{role: :admin}, _scoped_struct, _rule), do: true
def has_user_access?(%{id: user_id}, %User{id: id}, _rule) when user_id === id, do: true
def has_user_access?(_current_user, %User{}, _rule), do: false
end
Expand Down

0 comments on commit 22c550a

Please sign in to comment.