Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions src/assets/user-management-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,58 @@
]
}
},
"/api/v1/permission/revoke": {
"put": {
"tags": [
"User Management"
],
"summary": "Revokes the user permissions",
"description": "Revokes the user permissions.",
"operationId": "revokePermission",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoleDetails"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful response - Returns the boolean flag true.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"400": {
"description": "Invalid request."
},
"404": {
"description": "User not found."
},
"500": {
"description": "Internal server error."
},
"401": {
"description": "Unauthenticated request"
},
"403": {
"description": "Unauthorized request"
}
},
"security": [
{
"AuthorizationToken": []
}
]
}
},
"/api/v1/project-group": {
"get": {
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion src/controller/user-management-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public intializeRoutes() {
this.router.post(`${this.path}/api/v1/register`, validationMiddleware(RegisterUserDto), this.registerUser);
this.router.post(`${this.path}/api/v1/permission`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.updatePermissions);
// this.router.put(`${this.path}/api/v1/permission/revoke`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.revokePermissions);
this.router.put(`${this.path}/api/v1/permission/revoke`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.revokePermissions);
this.router.get(`${this.path}/api/v1/roles`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN]), this.getRoles);
this.router.get(`${this.path}/api/v1/project-group-roles/:userId`, authorizationMiddleware([], false, true), this.projectGroupRoles);
this.router.post(`${this.path}/api/v1/authenticate`, validationMiddleware(LoginDto), this.login);
Expand Down
Loading