Skip to content

Commit 9cc0f88

Browse files
authored
Merge pull request #125 from onepanelio/feat/auth.from.dev
feat: add auth checks for displaying workflow/space actions
2 parents 11a1a54 + e5de3ed commit 9cc0f88

File tree

77 files changed

+546
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+546
-111
lines changed

src/api/api/authService.service.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -18,6 +18,7 @@ import { CustomHttpParameterCodec } from '../encoder';
1818
import { Observable } from 'rxjs';
1919

2020
import { GrpcGatewayRuntimeError } from '../model/models';
21+
import { IsAuthorized } from '../model/models';
2122
import { IsAuthorizedResponse } from '../model/models';
2223
import { IsValidTokenResponse } from '../model/models';
2324
import { TokenWrapper } from '../model/models';
@@ -89,13 +90,17 @@ export class AuthServiceService {
8990
}
9091

9192
/**
93+
* @param body
9294
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
9395
* @param reportProgress flag to report request and response progress.
9496
*/
95-
public isAuthorized(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<IsAuthorizedResponse>;
96-
public isAuthorized(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<IsAuthorizedResponse>>;
97-
public isAuthorized(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<IsAuthorizedResponse>>;
98-
public isAuthorized(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
97+
public isAuthorized(body: IsAuthorized, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<IsAuthorizedResponse>;
98+
public isAuthorized(body: IsAuthorized, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<IsAuthorizedResponse>>;
99+
public isAuthorized(body: IsAuthorized, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<IsAuthorizedResponse>>;
100+
public isAuthorized(body: IsAuthorized, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
101+
if (body === null || body === undefined) {
102+
throw new Error('Required parameter body was null or undefined when calling isAuthorized.');
103+
}
99104

100105
let headers = this.defaultHeaders;
101106

@@ -120,13 +125,22 @@ export class AuthServiceService {
120125
}
121126

122127

128+
// to determine the Content-Type header
129+
const consumes: string[] = [
130+
'application/json'
131+
];
132+
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
133+
if (httpContentTypeSelected !== undefined) {
134+
headers = headers.set('Content-Type', httpContentTypeSelected);
135+
}
136+
123137
let responseType: 'text' | 'json' = 'json';
124138
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
125139
responseType = 'text';
126140
}
127141

128142
return this.httpClient.post<IsAuthorizedResponse>(`${this.configuration.basePath}/apis/v1beta1/auth`,
129-
null,
143+
body,
130144
{
131145
responseType: <any>responseType,
132146
withCredentials: this.configuration.withCredentials,

src/api/api/cronWorkflowService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/labelService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/namespaceService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/secretService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/workflowService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/workflowTemplateService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/workspaceService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/api/workspaceTemplateService.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/api/model/addSecretKeyValueResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Onepanel
33
* Onepanel API
44
*
5-
* The version of the OpenAPI document: 0.10.0
5+
* The version of the OpenAPI document: 0.11.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)