remove previous "allow user routes" functionality
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending
This commit is contained in:
parent
c5a44a59db
commit
ac25b051ae
1 changed files with 2 additions and 11 deletions
|
@ -67,7 +67,8 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do
|
||||||
Logger.debug("Failed to map identity from signature (lookup failure)")
|
Logger.debug("Failed to map identity from signature (lookup failure)")
|
||||||
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}")
|
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}")
|
||||||
|
|
||||||
only_permit_user_routes(conn)
|
conn
|
||||||
|
|> assign(:valid_signature, false)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
Logger.debug("Failed to map identity from signature (no payload actor mismatch)")
|
Logger.debug("Failed to map identity from signature (no payload actor mismatch)")
|
||||||
|
@ -81,16 +82,6 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do
|
||||||
# no signature at all
|
# no signature at all
|
||||||
def call(conn, _opts), do: conn
|
def call(conn, _opts), do: conn
|
||||||
|
|
||||||
defp only_permit_user_routes(%{path_info: ["users", _]} = conn) do
|
|
||||||
conn
|
|
||||||
|> assign(:limited_ap, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp only_permit_user_routes(conn) do
|
|
||||||
conn
|
|
||||||
|> assign(:valid_signature, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp key_id_from_conn(conn) do
|
defp key_id_from_conn(conn) do
|
||||||
case HTTPSignatures.signature_for_conn(conn) do
|
case HTTPSignatures.signature_for_conn(conn) do
|
||||||
%{"keyId" => key_id} when is_binary(key_id) ->
|
%{"keyId" => key_id} when is_binary(key_id) ->
|
||||||
|
|
Loading…
Reference in a new issue