Browse Source
Bugfix/MCP feature flag check in update of access (#8320)
Add missing MCP feature flag check
pull/8321/head^2
Thomas Kaul
24 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
20 additions and
0 deletions
-
apps/api/src/app/endpoints/accesses/access.controller.ts
-
apps/api/src/app/endpoints/accesses/accesses.controller.ts
|
|
@ -192,6 +192,16 @@ export class AccessController { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
originalAccess.type === 'MCP' && |
|
|
|
|
|
!this.configurationService.get('ENABLE_FEATURE_MCP') |
|
|
|
|
|
) { |
|
|
|
|
|
throw new HttpException( |
|
|
|
|
|
getReasonPhrase(StatusCodes.BAD_REQUEST), |
|
|
|
|
|
StatusCodes.BAD_REQUEST |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
!isValidGranteeOfAccess({ |
|
|
!isValidGranteeOfAccess({ |
|
|
granteeUserId: data.granteeUserId, |
|
|
granteeUserId: data.granteeUserId, |
|
|
|
|
|
@ -182,6 +182,16 @@ export class AccessesController { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
originalAccess.type === 'MCP' && |
|
|
|
|
|
!this.configurationService.get('ENABLE_FEATURE_MCP') |
|
|
|
|
|
) { |
|
|
|
|
|
throw new HttpException( |
|
|
|
|
|
getReasonPhrase(StatusCodes.BAD_REQUEST), |
|
|
|
|
|
StatusCodes.BAD_REQUEST |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
!isValidGranteeOfAccess({ |
|
|
!isValidGranteeOfAccess({ |
|
|
granteeUserId: data.granteeUserId, |
|
|
granteeUserId: data.granteeUserId, |
|
|
|