mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
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:
@@ -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
|
||||
})
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user