[FIx] shouldBypassPermissionChecks for workspaceMember repository (#15706)

<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Pass `shouldBypassPermissionChecks: true` to
`getRepositoryForWorkspace('workspaceMember')` in
`1-11-clean-orphaned-user-workspaces.command.ts` to ensure member lookup
during orphan cleanup ignores permissions.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
543fd9fc01. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Félix Malfait <[email protected]>
This commit is contained in:
Marie
2025-11-11 17:17:42 +01:00
committed by GitHub
co-authored by Félix Malfait
parent 703d9cb08d
commit de978960d0
@@ -52,6 +52,7 @@ export class CleanOrphanedUserWorkspacesCommand extends ActiveOrSuspendedWorkspa
await this.twentyORMGlobalManager.getRepositoryForWorkspace<WorkspaceMemberWorkspaceEntity>(
workspaceId,
'workspaceMember',
{ shouldBypassPermissionChecks: true },
);
const workspaceMembers = await workspaceMemberRepository.find({