feat(fullstack): Set user roles per orga, scope notification to orga and role, add orga and role to JWT
This commit is contained in:
@@ -394,6 +394,35 @@ paths:
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
put:
|
||||
summary: Update a user
|
||||
operationId: updateUser
|
||||
description: Updates a user. If no request body is provided, the user data will be synchronized from JWT token claims.
|
||||
tags:
|
||||
- user
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
responses:
|
||||
"200":
|
||||
description: User successfully updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"404":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/NotFound"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
delete:
|
||||
summary: Delete a user
|
||||
operationId: deleteUser
|
||||
@@ -1049,6 +1078,7 @@ components:
|
||||
- id
|
||||
- name
|
||||
- status
|
||||
- organizationRoles
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
@@ -1056,8 +1086,13 @@ components:
|
||||
type: string
|
||||
status:
|
||||
$ref: "#/components/schemas/UserStatus"
|
||||
role:
|
||||
$ref: "#/components/schemas/UserRole"
|
||||
organizationRoles:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/UserRole"
|
||||
description: "Map of organization IDs to arrays of user roles in those organizations"
|
||||
|
||||
CreateUserDto:
|
||||
type: object
|
||||
@@ -1065,7 +1100,6 @@ components:
|
||||
- id
|
||||
- name
|
||||
- status
|
||||
- role
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
@@ -1073,8 +1107,13 @@ components:
|
||||
type: string
|
||||
status:
|
||||
$ref: "#/components/schemas/UserStatus"
|
||||
role:
|
||||
$ref: "#/components/schemas/UserRole"
|
||||
organizationRoles:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/UserRole"
|
||||
description: "Map of organization IDs to arrays of user roles in those organizations"
|
||||
|
||||
UserStatus:
|
||||
type: string
|
||||
@@ -1176,9 +1215,10 @@ components:
|
||||
- message
|
||||
- clickTarget
|
||||
- isRead
|
||||
- targetGroup
|
||||
- role
|
||||
- type
|
||||
- createdAt
|
||||
- organizationId
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
@@ -1195,10 +1235,12 @@ components:
|
||||
nullable: true
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/UserDto"
|
||||
targetGroup:
|
||||
role:
|
||||
type: string
|
||||
type:
|
||||
$ref: "#/components/schemas/NotificationType"
|
||||
organizationId:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -1209,8 +1251,9 @@ components:
|
||||
- title
|
||||
- message
|
||||
- clickTarget
|
||||
- targetGroup
|
||||
- role
|
||||
- type
|
||||
- organizationId
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
@@ -1222,10 +1265,12 @@ components:
|
||||
nullable: true
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/UserDto"
|
||||
targetGroup:
|
||||
role:
|
||||
type: string
|
||||
type:
|
||||
$ref: "#/components/schemas/NotificationType"
|
||||
organizationId:
|
||||
type: string
|
||||
|
||||
PagedNotificationDto:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user