Browse Source

Bugfix/MCP feature flag check in update of access (#8320)

Add missing MCP feature flag check
pull/8321/head^2
Thomas Kaul 23 hours ago
committed by GitHub
parent
commit
7d3241c679
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      apps/api/src/app/endpoints/accesses/access.controller.ts
  2. 10
      apps/api/src/app/endpoints/accesses/accesses.controller.ts

10
apps/api/src/app/endpoints/accesses/access.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 (
!isValidGranteeOfAccess({
granteeUserId: data.granteeUserId,

10
apps/api/src/app/endpoints/accesses/accesses.controller.ts

@ -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 (
!isValidGranteeOfAccess({
granteeUserId: data.granteeUserId,

Loading…
Cancel
Save