You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35a1a78
Browse filesBrowse the repository at this point in the historyBrowse files
UpdateProvisionedOrgMembership and UpdateAttributeForSCIMUser passed
their parameters through addOptions, which only serializes url-tagged
fields. Since the SCIM types are json-tagged, nothing was sent and the
calls were effectively no-ops. They also discarded the updated user
returned by the API.
Both methods now send the payload as the request body and return the
updated *SCIMUserAttributes. The body is taken by value via dedicated
request types: a new UpdateProvisionedOrgMembershipRequest and
UpdateAttributeForSCIMUserRequest (renamed from
UpdateAttributeForSCIMUserOptions), whose Operations field is now a
slice as required by the SCIM PATCH spec. The //nolint:paramcheck
workaround is removed.
Fixesgoogle#4301.
// UpdateProvisionedOrgMembership updates a provisioned organization membership.
166
180
//
167
181
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/scim/scim?apiVersion=2022-11-28#update-a-provisioned-organization-membership
168
182
//
169
183
//meta:operation PUT /scim/v2/organizations/{org}/Users/{scim_user_id}
req, err:=s.client.NewRequest(ctx, "PUT", u, body)
173
187
iferr!=nil {
174
-
returnnil, err
188
+
returnnil, nil, err
175
189
}
176
190
177
-
req, err:=s.client.NewRequest(ctx, "PUT", u, nil)
191
+
varuser*SCIMUserAttributes
192
+
resp, err:=s.client.Do(req, &user)
178
193
iferr!=nil {
179
-
returnnil, err
194
+
returnnil, resp, err
180
195
}
181
196
182
-
returns.client.Do(req, nil)
197
+
returnuser, resp, nil
183
198
}
184
199
185
-
// UpdateAttributeForSCIMUserOptions represents options for UpdateAttributeForSCIMUser.
200
+
// UpdateAttributeForSCIMUserRequest represents the body of a request to update an
201
+
// attribute for a SCIM user.
186
202
//
187
203
// GitHub API docs: https://docs.github.com/rest/scim#update-an-attribute-for-a-scim-user--parameters
Operations[]*UpdateAttributeForSCIMUserOperations`json:"Operations"`// Set of operations to be performed. (Required.)
191
207
}
192
208
193
209
// UpdateAttributeForSCIMUserOperations represents operations for UpdateAttributeForSCIMUser.
@@ -202,19 +218,20 @@ type UpdateAttributeForSCIMUserOperations struct {
202
218
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/scim/scim?apiVersion=2022-11-28#update-an-attribute-for-a-scim-user
0 commit comments