Skip to content

Commit 55e15a8

Browse files
authored
Merge pull request #120 from TaskarCenterAtUW/feature-1504
revoking the changes
2 parents e005246 + 26090f4 commit 55e15a8

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

src/assets/user-management-spec.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,58 @@
679679
]
680680
}
681681
},
682+
"/api/v1/permission/revoke": {
683+
"put": {
684+
"tags": [
685+
"User Management"
686+
],
687+
"summary": "Revokes the user permissions",
688+
"description": "Revokes the user permissions.",
689+
"operationId": "revokePermission",
690+
"requestBody": {
691+
"content": {
692+
"application/json": {
693+
"schema": {
694+
"$ref": "#/components/schemas/RoleDetails"
695+
}
696+
}
697+
},
698+
"required": true
699+
},
700+
"responses": {
701+
"200": {
702+
"description": "Successful response - Returns the boolean flag true.",
703+
"content": {
704+
"application/json": {
705+
"schema": {
706+
"$ref": "#/components/schemas/Response"
707+
}
708+
}
709+
}
710+
},
711+
"400": {
712+
"description": "Invalid request."
713+
},
714+
"404": {
715+
"description": "User not found."
716+
},
717+
"500": {
718+
"description": "Internal server error."
719+
},
720+
"401": {
721+
"description": "Unauthenticated request"
722+
},
723+
"403": {
724+
"description": "Unauthorized request"
725+
}
726+
},
727+
"security": [
728+
{
729+
"AuthorizationToken": []
730+
}
731+
]
732+
}
733+
},
682734
"/api/v1/project-group": {
683735
"get": {
684736
"tags": [

src/controller/user-management-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class UserManagementController implements IController {
2424
public intializeRoutes() {
2525
this.router.post(`${this.path}/api/v1/register`, validationMiddleware(RegisterUserDto), this.registerUser);
2626
this.router.post(`${this.path}/api/v1/permission`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.updatePermissions);
27-
// this.router.put(`${this.path}/api/v1/permission/revoke`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.revokePermissions);
27+
this.router.put(`${this.path}/api/v1/permission/revoke`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN], true), validationMiddleware(RolesReqDto), this.revokePermissions);
2828
this.router.get(`${this.path}/api/v1/roles`, authorizationMiddleware([Role.POC, Role.TDEI_ADMIN]), this.getRoles);
2929
this.router.get(`${this.path}/api/v1/project-group-roles/:userId`, authorizationMiddleware([], false, true), this.projectGroupRoles);
3030
this.router.post(`${this.path}/api/v1/authenticate`, validationMiddleware(LoginDto), this.login);

0 commit comments

Comments
 (0)