merge keywoards
All checks were successful
Build and Publish / build-release (push) Successful in 1m10s
All checks were successful
Build and Publish / build-release (push) Successful in 1m10s
This commit is contained in:
@@ -26,8 +26,7 @@ defmodule PolicyServiceWeb.Plugs.AuthorizeRoles do
|
||||
do:
|
||||
opts
|
||||
|> Keyword.validate!([
|
||||
:roles_claim,
|
||||
:required_permissions
|
||||
:roles_claim
|
||||
])
|
||||
|
||||
@impl Plug
|
||||
|
||||
@@ -83,12 +83,9 @@ defmodule PolicyServiceWeb.Router do
|
||||
def authorize_roles(conn, opts) do
|
||||
zitadel = Application.get_env(:policy_service, :zitadel)
|
||||
|
||||
opts =
|
||||
PolicyServiceWeb.Plugs.AuthorizeRoles.init(
|
||||
roles_claim: zitadel[:roles_claim],
|
||||
required_permissions: opts[:required_permissions]
|
||||
)
|
||||
o =
|
||||
PolicyServiceWeb.Plugs.AuthorizeRoles.init(roles_claim: zitadel[:roles_claim])
|
||||
|
||||
PolicyServiceWeb.Plugs.AuthorizeRoles.call(conn, opts)
|
||||
PolicyServiceWeb.Plugs.AuthorizeRoles.call(conn, Keyword.merge(opts, o))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user