Skip to content

Commit

Permalink
Fix permission errors for watching prebuild logs (#20026)
Browse files Browse the repository at this point in the history
* Revert "Prebuild issues roundup (#20000)"

This reverts commit fbc0d76.

* Reapply "Prebuild issues roundup (#20000)"

This reverts commit bb45446.

* Fix permission check for watching prebuild logs
  • Loading branch information
filiptronicek authored Jul 11, 2024
1 parent 669cad5 commit ecd52dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/server/src/prebuilds/prebuild-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,9 @@ export class PrebuildManager {
}
await this.auth.checkPermissionOnOrganization(userId, "read_prebuild", organizationId);

const instance = await this.workspaceService.getCurrentInstance(userId, prebuild.workspace.id);
const instance = await this.workspaceService.getCurrentInstance(userId, prebuild.workspace.id, {
skipPermissionCheck: true,
});
const urls = await this.workspaceService.getHeadlessLog(userId, instance.id, async () => {});

const taskUrl = urls.streams[taskId];
Expand Down

0 comments on commit ecd52dc

Please sign in to comment.