creating and viewing grants
This commit is contained in:
21
src/main/resources/api-definition/rbac-grant-schemas.yaml
Normal file
21
src/main/resources/api-definition/rbac-grant-schemas.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
components:
|
||||
|
||||
schemas:
|
||||
|
||||
RbacGrant:
|
||||
type: object
|
||||
properties:
|
||||
userUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
roleUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
assumed:
|
||||
type: boolean
|
||||
empowered:
|
||||
type: boolean
|
||||
required:
|
||||
- userUuid
|
||||
- roleUuid
|
39
src/main/resources/api-definition/rbac-grants.yaml
Normal file
39
src/main/resources/api-definition/rbac-grants.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
get:
|
||||
tags:
|
||||
- rbacgrants
|
||||
operationId: listUserGrants
|
||||
parameters:
|
||||
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './api-definition/auth.yaml#/components/parameters/assumedRoles'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: './api-definition/rbac-grant-schemas.yaml#/components/schemas/RbacGrant'
|
||||
|
||||
post:
|
||||
tags:
|
||||
- rbacgrants
|
||||
operationId: grantRoleToUser
|
||||
parameters:
|
||||
- $ref: './api-definition/auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './api-definition/auth.yaml#/components/parameters/assumedRoles'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: './api-definition/rbac-grant-schemas.yaml#/components/schemas/RbacGrant'
|
||||
responses:
|
||||
"201":
|
||||
description: OK
|
||||
"401":
|
||||
$ref: './api-definition/error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './api-definition/error-responses.yaml#/components/responses/Forbidden'
|
||||
"409":
|
||||
$ref: './api-definition/error-responses.yaml#/components/responses/Conflict'
|
Reference in New Issue
Block a user