From fdde842d1eab348fe9616e61b737a43fe0ecaae9 Mon Sep 17 00:00:00 2001 From: Eduardo Gomes Date: Wed, 5 Apr 2023 12:06:21 +0100 Subject: [PATCH] Add flag to Access organizations --- .changelog/1260.txt | 3 +++ access_organization.go | 1 + access_organization_test.go | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 .changelog/1260.txt diff --git a/.changelog/1260.txt b/.changelog/1260.txt new file mode 100644 index 00000000000..806345d4646 --- /dev/null +++ b/.changelog/1260.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +access: Add `auto_redirect_to_identity` flag to Access organizations +``` diff --git a/access_organization.go b/access_organization.go index f4de4a7b684..ff2fef9ded6 100644 --- a/access_organization.go +++ b/access_organization.go @@ -18,6 +18,7 @@ type AccessOrganization struct { IsUIReadOnly *bool `json:"is_ui_read_only,omitempty"` UIReadOnlyToggleReason string `json:"ui_read_only_toggle_reason,omitempty"` UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time,omitempty"` + AutoRedirectToIdentity *bool `json:"auto_redirect_to_identity,omitempty"` } // AccessOrganizationLoginDesign represents the login design options. diff --git a/access_organization_test.go b/access_organization_test.go index 7d6cfa60e33..3ea79970a4c 100644 --- a/access_organization_test.go +++ b/access_organization_test.go @@ -28,6 +28,7 @@ func TestAccessOrganization(t *testing.T) { "auth_domain": "test.cloudflareaccess.com", "is_ui_read_only": false, "user_seat_expiration_inactive_time": "720h", + "auto_redirect_to_identity": true, "login_design": { "background_color": "#c5ed1b", "logo_path": "https://example.com/logo.png", @@ -57,6 +58,7 @@ func TestAccessOrganization(t *testing.T) { }, IsUIReadOnly: BoolPtr(false), UserSeatExpirationInactiveTime: "720h", + AutoRedirectToIdentity: BoolPtr(true), } mux.HandleFunc("/accounts/"+testAccountID+"/access/organizations", handler)