feat(portal): sync all google workspace organization units (#6649)

Currently only root OUs are synced into Firezone. An additional query
parameter is needed to list all OUs.

Ref:
https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits/list
This commit is contained in:
Antoine
2024-09-12 20:12:43 +02:00
committed by GitHub
parent 7830482ab3
commit e30127dbff
2 changed files with 2 additions and 1 deletions

View File

@@ -123,6 +123,7 @@ defmodule Domain.Auth.Adapters.GoogleWorkspace.APIClient do
URI.parse("#{endpoint}/admin/directory/v1/customer/my_customer/orgunits")
|> URI.append_query(
URI.encode_query(%{
"type" => "ALL",
"maxResults" => @max_results
})
)

View File

@@ -65,7 +65,7 @@ defmodule Domain.Auth.Adapters.GoogleWorkspace.APIClientTest do
end
assert_receive {:bypass_request, conn}
assert conn.params == %{"maxResults" => "350"}
assert conn.params == %{"maxResults" => "350", "type" => "ALL"}
assert Plug.Conn.get_req_header(conn, "authorization") == ["Bearer #{api_token}"]
end