Skip to content

Commit

Permalink
Remove useAPI from DeleteUser and DeleteIDPConfigurationModal (minio#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia authored Jan 17, 2024
1 parent c87ebe4 commit 2474232
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 73 deletions.
22 changes: 14 additions & 8 deletions api/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions api/operations/user/check_user_service_accounts_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions models/selected_users.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 23 additions & 21 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ securityDefinitions:
type: apiKey
# Apply the key security definition to all APIs
security:
- key: []
- key: [ ]
parameters:
limit:
name: limit
Expand Down Expand Up @@ -54,7 +54,7 @@ paths:
schema:
$ref: "#/definitions/ApiError"
# Exclude this API from the authentication requirement
security: []
security: [ ]
tags:
- Auth
post:
Expand All @@ -74,7 +74,7 @@ paths:
schema:
$ref: "#/definitions/ApiError"
# Exclude this API from the authentication requirement
security: []
security: [ ]
tags:
- Auth
/login/oauth2/auth:
Expand All @@ -94,7 +94,7 @@ paths:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
security: []
security: [ ]
tags:
- Auth

Expand Down Expand Up @@ -295,8 +295,8 @@ paths:
get:
summary: List Objects
security:
- key: []
- anonymous: []
- key: [ ]
- anonymous: [ ]
operationId: ListObjects
parameters:
- name: bucket_name
Expand Down Expand Up @@ -411,8 +411,8 @@ paths:
post:
summary: Uploads an Object.
security:
- key: []
- anonymous: []
- key: [ ]
- anonymous: [ ]
consumes:
- multipart/form-data
parameters:
Expand All @@ -438,8 +438,8 @@ paths:
summary: Download Multiple Objects
operationId: DownloadMultipleObjects
security:
- key: []
- anonymous: []
- key: [ ]
- anonymous: [ ]
produces:
- application/octet-stream
parameters:
Expand Down Expand Up @@ -471,8 +471,8 @@ paths:
summary: Download Object
operationId: Download Object
security:
- key: []
- anonymous: []
- key: [ ]
- anonymous: [ ]
produces:
- application/octet-stream
parameters:
Expand Down Expand Up @@ -1546,9 +1546,7 @@ paths:
in: body
required: true
schema:
type: array
items:
type: string
$ref: "#/definitions/selectedUsers"
responses:
200:
description: A successful response.
Expand Down Expand Up @@ -2889,7 +2887,7 @@ paths:
- name: order
in: query
type: string
enum: [timeDesc, timeAsc]
enum: [ timeDesc, timeAsc ]
default: timeDesc
- name: timeStart
in: query
Expand Down Expand Up @@ -3766,6 +3764,10 @@ definitions:
items:
$ref: "#/definitions/user"
title: list of resulting users
selectedUsers:
type: array
items:
type: string
addUserRequest:
type: object
required:
Expand Down Expand Up @@ -4325,7 +4327,7 @@ definitions:
properties:
loginStrategy:
type: string
enum: [form, redirect, service-account, redirect-service-account]
enum: [ form, redirect, service-account, redirect-service-account ]
redirectRules:
type: array
items:
Expand Down Expand Up @@ -4424,7 +4426,7 @@ definitions:
type: string
status:
type: string
enum: [ok]
enum: [ ok ]
operator:
type: boolean
distributedMode:
Expand Down Expand Up @@ -4455,7 +4457,7 @@ definitions:
type: string
values:
type: array
items: {}
items: { }
resultTarget:
type: object
properties:
Expand Down Expand Up @@ -4911,7 +4913,7 @@ definitions:
type: string
service:
type: string
enum: [replication]
enum: [ replication ]
syncMode:
type: string
bandwidth:
Expand Down Expand Up @@ -5110,7 +5112,7 @@ definitions:
format: int64
newer_noncurrent_expiration_versions:
type: integer
format: int64
format: int64

transitionResponse:
type: object
Expand Down
13 changes: 8 additions & 5 deletions web-app/src/api/consoleApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export interface ListUsersResponse {
users?: User[];
}

export type SelectedUsers = string[];

export interface AddUserRequest {
accessKey: string;
secretKey: string;
Expand Down Expand Up @@ -3242,14 +3244,15 @@ export class Api<
* @secure
*/
checkUserServiceAccounts: (
selectedUsers: string[],
selectedUsers: SelectedUsers,
params: RequestParams = {},
) =>
this.request<UserServiceAccountSummary, ApiError>({
path: `/users/service-accounts`,
method: "POST",
body: selectedUsers,
secure: true,
type: ContentType.Json,
format: "json",
...params,
}),
Expand Down Expand Up @@ -3635,7 +3638,7 @@ export class Api<
* @secure
*/
listUsersForPolicy: (policy: string, params: RequestParams = {}) =>
this.request<string[], ApiError>({
this.request<SelectedUsers, ApiError>({
path: `/policies/${policy}/users`,
method: "GET",
secure: true,
Expand All @@ -3653,7 +3656,7 @@ export class Api<
* @secure
*/
listGroupsForPolicy: (policy: string, params: RequestParams = {}) =>
this.request<string[], ApiError>({
this.request<SelectedUsers, ApiError>({
path: `/policies/${policy}/groups`,
method: "GET",
secure: true,
Expand Down Expand Up @@ -3805,7 +3808,7 @@ export class Api<
},
params: RequestParams = {},
) =>
this.request<string[], ApiError>({
this.request<SelectedUsers, ApiError>({
path: `/bucket-users/${bucket}`,
method: "GET",
query: query,
Expand Down Expand Up @@ -4566,7 +4569,7 @@ export class Api<
* @secure
*/
listNodes: (params: RequestParams = {}) =>
this.request<string[], ApiError>({
this.request<SelectedUsers, ApiError>({
path: `/nodes`,
method: "GET",
secure: true,
Expand Down
Loading

0 comments on commit 2474232

Please sign in to comment.