Skip to content

Commit 2474232

Browse files
authored
Remove useAPI from DeleteUser and DeleteIDPConfigurationModal (#3191)
1 parent c87ebe4 commit 2474232

File tree

7 files changed

+145
-73
lines changed

7 files changed

+145
-73
lines changed

api/embedded_spec.go

Lines changed: 14 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/operations/user/check_user_service_accounts_parameters.go

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/selected_users.go

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swagger.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ securityDefinitions:
2525
type: apiKey
2626
# Apply the key security definition to all APIs
2727
security:
28-
- key: []
28+
- key: [ ]
2929
parameters:
3030
limit:
3131
name: limit
@@ -54,7 +54,7 @@ paths:
5454
schema:
5555
$ref: "#/definitions/ApiError"
5656
# Exclude this API from the authentication requirement
57-
security: []
57+
security: [ ]
5858
tags:
5959
- Auth
6060
post:
@@ -74,7 +74,7 @@ paths:
7474
schema:
7575
$ref: "#/definitions/ApiError"
7676
# Exclude this API from the authentication requirement
77-
security: []
77+
security: [ ]
7878
tags:
7979
- Auth
8080
/login/oauth2/auth:
@@ -94,7 +94,7 @@ paths:
9494
description: Generic error response.
9595
schema:
9696
$ref: "#/definitions/ApiError"
97-
security: []
97+
security: [ ]
9898
tags:
9999
- Auth
100100

@@ -295,8 +295,8 @@ paths:
295295
get:
296296
summary: List Objects
297297
security:
298-
- key: []
299-
- anonymous: []
298+
- key: [ ]
299+
- anonymous: [ ]
300300
operationId: ListObjects
301301
parameters:
302302
- name: bucket_name
@@ -411,8 +411,8 @@ paths:
411411
post:
412412
summary: Uploads an Object.
413413
security:
414-
- key: []
415-
- anonymous: []
414+
- key: [ ]
415+
- anonymous: [ ]
416416
consumes:
417417
- multipart/form-data
418418
parameters:
@@ -438,8 +438,8 @@ paths:
438438
summary: Download Multiple Objects
439439
operationId: DownloadMultipleObjects
440440
security:
441-
- key: []
442-
- anonymous: []
441+
- key: [ ]
442+
- anonymous: [ ]
443443
produces:
444444
- application/octet-stream
445445
parameters:
@@ -471,8 +471,8 @@ paths:
471471
summary: Download Object
472472
operationId: Download Object
473473
security:
474-
- key: []
475-
- anonymous: []
474+
- key: [ ]
475+
- anonymous: [ ]
476476
produces:
477477
- application/octet-stream
478478
parameters:
@@ -1546,9 +1546,7 @@ paths:
15461546
in: body
15471547
required: true
15481548
schema:
1549-
type: array
1550-
items:
1551-
type: string
1549+
$ref: "#/definitions/selectedUsers"
15521550
responses:
15531551
200:
15541552
description: A successful response.
@@ -2889,7 +2887,7 @@ paths:
28892887
- name: order
28902888
in: query
28912889
type: string
2892-
enum: [timeDesc, timeAsc]
2890+
enum: [ timeDesc, timeAsc ]
28932891
default: timeDesc
28942892
- name: timeStart
28952893
in: query
@@ -3766,6 +3764,10 @@ definitions:
37663764
items:
37673765
$ref: "#/definitions/user"
37683766
title: list of resulting users
3767+
selectedUsers:
3768+
type: array
3769+
items:
3770+
type: string
37693771
addUserRequest:
37703772
type: object
37713773
required:
@@ -4325,7 +4327,7 @@ definitions:
43254327
properties:
43264328
loginStrategy:
43274329
type: string
4328-
enum: [form, redirect, service-account, redirect-service-account]
4330+
enum: [ form, redirect, service-account, redirect-service-account ]
43294331
redirectRules:
43304332
type: array
43314333
items:
@@ -4424,7 +4426,7 @@ definitions:
44244426
type: string
44254427
status:
44264428
type: string
4427-
enum: [ok]
4429+
enum: [ ok ]
44284430
operator:
44294431
type: boolean
44304432
distributedMode:
@@ -4455,7 +4457,7 @@ definitions:
44554457
type: string
44564458
values:
44574459
type: array
4458-
items: {}
4460+
items: { }
44594461
resultTarget:
44604462
type: object
44614463
properties:
@@ -4911,7 +4913,7 @@ definitions:
49114913
type: string
49124914
service:
49134915
type: string
4914-
enum: [replication]
4916+
enum: [ replication ]
49154917
syncMode:
49164918
type: string
49174919
bandwidth:
@@ -5110,7 +5112,7 @@ definitions:
51105112
format: int64
51115113
newer_noncurrent_expiration_versions:
51125114
type: integer
5113-
format: int64
5115+
format: int64
51145116

51155117
transitionResponse:
51165118
type: object

web-app/src/api/consoleApi.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ export interface ListUsersResponse {
149149
users?: User[];
150150
}
151151

152+
export type SelectedUsers = string[];
153+
152154
export interface AddUserRequest {
153155
accessKey: string;
154156
secretKey: string;
@@ -3242,14 +3244,15 @@ export class Api<
32423244
* @secure
32433245
*/
32443246
checkUserServiceAccounts: (
3245-
selectedUsers: string[],
3247+
selectedUsers: SelectedUsers,
32463248
params: RequestParams = {},
32473249
) =>
32483250
this.request<UserServiceAccountSummary, ApiError>({
32493251
path: `/users/service-accounts`,
32503252
method: "POST",
32513253
body: selectedUsers,
32523254
secure: true,
3255+
type: ContentType.Json,
32533256
format: "json",
32543257
...params,
32553258
}),
@@ -3635,7 +3638,7 @@ export class Api<
36353638
* @secure
36363639
*/
36373640
listUsersForPolicy: (policy: string, params: RequestParams = {}) =>
3638-
this.request<string[], ApiError>({
3641+
this.request<SelectedUsers, ApiError>({
36393642
path: `/policies/${policy}/users`,
36403643
method: "GET",
36413644
secure: true,
@@ -3653,7 +3656,7 @@ export class Api<
36533656
* @secure
36543657
*/
36553658
listGroupsForPolicy: (policy: string, params: RequestParams = {}) =>
3656-
this.request<string[], ApiError>({
3659+
this.request<SelectedUsers, ApiError>({
36573660
path: `/policies/${policy}/groups`,
36583661
method: "GET",
36593662
secure: true,
@@ -3805,7 +3808,7 @@ export class Api<
38053808
},
38063809
params: RequestParams = {},
38073810
) =>
3808-
this.request<string[], ApiError>({
3811+
this.request<SelectedUsers, ApiError>({
38093812
path: `/bucket-users/${bucket}`,
38103813
method: "GET",
38113814
query: query,
@@ -4566,7 +4569,7 @@ export class Api<
45664569
* @secure
45674570
*/
45684571
listNodes: (params: RequestParams = {}) =>
4569-
this.request<string[], ApiError>({
4572+
this.request<SelectedUsers, ApiError>({
45704573
path: `/nodes`,
45714574
method: "GET",
45724575
secure: true,

0 commit comments

Comments
 (0)