Message/Calendar thread temporary fix during datasource refactoring (#16480)

The current repository implementation require the caller to pass the
permissionConfig which is not the case in messaging and calendar custom
resolver. We are bypassing the permission as fetching the role in the
caller will likely not be needed anymore in the new datasource / orm
implementation
This commit is contained in:
Charles Bochet
2025-12-11 00:22:48 +01:00
committed by GitHub
parent 2948880a0b
commit bed5270f3c
2 changed files with 4 additions and 0 deletions
@@ -191,6 +191,7 @@ export class TimelineCalendarEventService {
await this.globalWorkspaceOrmManager.getRepository<PersonWorkspaceEntity>(
workspaceId,
'person',
{ shouldBypassPermissionChecks: true },
);
const personIds = await personRepository.find({
@@ -246,6 +247,7 @@ export class TimelineCalendarEventService {
await this.globalWorkspaceOrmManager.getRepository<OpportunityWorkspaceEntity>(
workspaceId,
'opportunity',
{ shouldBypassPermissionChecks: true },
);
const opportunity = await opportunityRepository.findOne({
@@ -83,6 +83,7 @@ export class GetMessagesService {
await this.globalWorkspaceOrmManager.getRepository<PersonWorkspaceEntity>(
workspaceId,
'person',
{ shouldBypassPermissionChecks: true },
);
const personIds = (
await personRepository.find({
@@ -131,6 +132,7 @@ export class GetMessagesService {
await this.globalWorkspaceOrmManager.getRepository<OpportunityWorkspaceEntity>(
workspaceId,
'opportunity',
{ shouldBypassPermissionChecks: true },
);
const opportunity = await opportunityRepository.findOne({