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
|
||||
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
|
||||
else
|
||||
conn
|
||||
|
||||
Reference in New Issue
Block a user