use keyword methods
All checks were successful
Build and Publish / build-release (push) Successful in 1m34s
All checks were successful
Build and Publish / build-release (push) Successful in 1m34s
This commit is contained in:
@@ -31,7 +31,11 @@ defmodule PolicyServiceWeb.Plugs.AuthorizeRoles do
|
|||||||
|
|
||||||
@impl Plug
|
@impl Plug
|
||||||
def call(conn, opts) do
|
def call(conn, opts) do
|
||||||
if authorized?(conn, opts.roles_claim, opts.required_permissions) do
|
if authorized?(
|
||||||
|
conn,
|
||||||
|
Keyword.get(opts, :roles_claim),
|
||||||
|
Keyword.get(opts, :required_permissions)
|
||||||
|
) do
|
||||||
conn
|
conn
|
||||||
else
|
else
|
||||||
conn
|
conn
|
||||||
|
|||||||
Reference in New Issue
Block a user