Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user_seat_expiration_inactive_time field to Access org #1159

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1159.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
access_organization: add user_seat_expiration_inactive_time field
```
13 changes: 7 additions & 6 deletions access_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (

// AccessOrganization represents an Access organization.
type AccessOrganization struct {
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
Name string `json:"name"`
AuthDomain string `json:"auth_domain"`
LoginDesign AccessOrganizationLoginDesign `json:"login_design"`
IsUIReadOnly *bool `json:"is_ui_read_only,omitempty"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
Name string `json:"name"`
AuthDomain string `json:"auth_domain"`
LoginDesign AccessOrganizationLoginDesign `json:"login_design"`
IsUIReadOnly *bool `json:"is_ui_read_only,omitempty"`
UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time,omitempty"`
}

// AccessOrganizationLoginDesign represents the login design options.
Expand Down
4 changes: 3 additions & 1 deletion access_organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestAccessOrganization(t *testing.T) {
"name": "Widget Corps Internal Applications",
"auth_domain": "test.cloudflareaccess.com",
"is_ui_read_only": false,
"user_seat_expiration_inactive_time": "720h",
"login_design": {
"background_color": "#c5ed1b",
"logo_path": "https://example.com/logo.png",
Expand Down Expand Up @@ -54,7 +55,8 @@ func TestAccessOrganization(t *testing.T) {
HeaderText: "Widget Corp",
FooterText: "© Widget Corp",
},
IsUIReadOnly: BoolPtr(false),
IsUIReadOnly: BoolPtr(false),
UserSeatExpirationInactiveTime: "720h",
}

mux.HandleFunc("/accounts/"+testAccountID+"/access/organizations", handler)
Expand Down