Skip to content

Commit

Permalink
feat: Expose max allowed organization roles and permissions properties
Browse files Browse the repository at this point in the history
There is a maximum number of organization roles and permissions that you can
create per instance. Expose those properties as part of the instance organization
settings response
  • Loading branch information
chanioxaris committed Jan 29, 2024
1 parent 2f041fe commit f258bed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clerk/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ type OrganizationSettingsResponse struct {
Object string `json:"object"`
Enabled bool `json:"enabled"`
MaxAllowedMemberships int `json:"max_allowed_memberships"`
MaxAllowedRoles int `json:"max_allowed_roles"`
MaxAllowedPermissions int `json:"max_allowed_permissions"`
CreatorRole string `json:"creator_role"`
AdminDeleteEnabled bool `json:"admin_delete_enabled"`
DomainsEnabled bool `json:"domains_enabled"`
Expand Down
2 changes: 2 additions & 0 deletions clerk/instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ func TestInstanceService_UpdateOrganizationSettings_happyPath(t *testing.T) {
dummyOrganizationSettingsResponseJSON := `{
"enabled": true,
"max_allowed_memberships": 2,
"max_allowed_roles": 10,
"max_allowed_permissions": 50,
"creator_role": "org:custom_admin",
"admin_delete_enabled": true,
"domains_enabled": true,
Expand Down

0 comments on commit f258bed

Please sign in to comment.