Skip to content

Commit c1272d1

Browse files
feat(api): add restrict_account_creation_to_scim field to organization policy
1 parent a58a207 commit c1272d1

5 files changed

Lines changed: 30 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 172
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-07e6f884c2d7d3023e23fce3a09bf303ab5edfbcafa0a41d5737008adc146058.yml
3-
openapi_spec_hash: 5e3806700798b135ab378ad69a3a59a8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3b3f2a4c16effce7e3d18cb37a6210edfe1b4abc64e73103cccea8314d8231da.yml
3+
openapi_spec_hash: 32fa6acbed5a7465fbd93c939c81a78f
44
config_hash: ad1db65b32248aecda41b64586aac9ce

src/gitpod/resources/organizations/policies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def update(
112112
members_require_projects: Optional[bool] | Omit = omit,
113113
port_sharing_disabled: Optional[bool] | Omit = omit,
114114
require_custom_domain_access: Optional[bool] | Omit = omit,
115+
restrict_account_creation_to_scim: Optional[bool] | Omit = omit,
115116
security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit,
116117
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
117118
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -204,6 +205,10 @@ def update(
204205
require_custom_domain_access: require_custom_domain_access controls whether users must access via custom
205206
domain when one is configured. When true, access via app.gitpod.io is blocked.
206207
208+
restrict_account_creation_to_scim: restrict_account_creation_to_scim controls whether account creation is
209+
restricted to SCIM-provisioned users only. When true and SCIM is configured for
210+
the organization, only users provisioned via SCIM can create accounts.
211+
207212
security_agent_policy: security_agent_policy contains security agent configuration updates
208213
209214
extra_headers: Send extra headers
@@ -234,6 +239,7 @@ def update(
234239
"members_require_projects": members_require_projects,
235240
"port_sharing_disabled": port_sharing_disabled,
236241
"require_custom_domain_access": require_custom_domain_access,
242+
"restrict_account_creation_to_scim": restrict_account_creation_to_scim,
237243
"security_agent_policy": security_agent_policy,
238244
},
239245
policy_update_params.PolicyUpdateParams,
@@ -336,6 +342,7 @@ async def update(
336342
members_require_projects: Optional[bool] | Omit = omit,
337343
port_sharing_disabled: Optional[bool] | Omit = omit,
338344
require_custom_domain_access: Optional[bool] | Omit = omit,
345+
restrict_account_creation_to_scim: Optional[bool] | Omit = omit,
339346
security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit,
340347
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
341348
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -428,6 +435,10 @@ async def update(
428435
require_custom_domain_access: require_custom_domain_access controls whether users must access via custom
429436
domain when one is configured. When true, access via app.gitpod.io is blocked.
430437
438+
restrict_account_creation_to_scim: restrict_account_creation_to_scim controls whether account creation is
439+
restricted to SCIM-provisioned users only. When true and SCIM is configured for
440+
the organization, only users provisioned via SCIM can create accounts.
441+
431442
security_agent_policy: security_agent_policy contains security agent configuration updates
432443
433444
extra_headers: Send extra headers
@@ -458,6 +469,7 @@ async def update(
458469
"members_require_projects": members_require_projects,
459470
"port_sharing_disabled": port_sharing_disabled,
460471
"require_custom_domain_access": require_custom_domain_access,
472+
"restrict_account_creation_to_scim": restrict_account_creation_to_scim,
461473
"security_agent_policy": security_agent_policy,
462474
},
463475
policy_update_params.PolicyUpdateParams,

src/gitpod/types/organizations/organization_policies.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ class OrganizationPolicies(BaseModel):
8787
domain when one is configured. When true, access via app.gitpod.io is blocked.
8888
"""
8989

90+
restrict_account_creation_to_scim: bool = FieldInfo(alias="restrictAccountCreationToScim")
91+
"""
92+
restrict_account_creation_to_scim controls whether account creation is
93+
restricted to SCIM-provisioned users only. When true and SCIM is configured for
94+
the organization, only users provisioned via SCIM can create accounts.
95+
"""
96+
9097
delete_archived_environments_after: Optional[str] = FieldInfo(alias="deleteArchivedEnvironmentsAfter", default=None)
9198
"""
9299
delete_archived_environments_after controls how long archived environments are

src/gitpod/types/organizations/policy_update_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ class PolicyUpdateParams(TypedDict, total=False):
112112
domain when one is configured. When true, access via app.gitpod.io is blocked.
113113
"""
114114

115+
restrict_account_creation_to_scim: Annotated[Optional[bool], PropertyInfo(alias="restrictAccountCreationToScim")]
116+
"""
117+
restrict_account_creation_to_scim controls whether account creation is
118+
restricted to SCIM-provisioned users only. When true and SCIM is configured for
119+
the organization, only users provisioned via SCIM can create accounts.
120+
"""
121+
115122
security_agent_policy: Annotated[Optional[SecurityAgentPolicy], PropertyInfo(alias="securityAgentPolicy")]
116123
"""security_agent_policy contains security agent configuration updates"""
117124

tests/api_resources/organizations/test_policies.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
8484
members_require_projects=True,
8585
port_sharing_disabled=True,
8686
require_custom_domain_access=True,
87+
restrict_account_creation_to_scim=True,
8788
security_agent_policy={
8889
"crowdstrike": {
8990
"additional_options": {"foo": "string"},
@@ -195,6 +196,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
195196
members_require_projects=True,
196197
port_sharing_disabled=True,
197198
require_custom_domain_access=True,
199+
restrict_account_creation_to_scim=True,
198200
security_agent_policy={
199201
"crowdstrike": {
200202
"additional_options": {"foo": "string"},

0 commit comments

Comments
 (0)