Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/server/src/prebuilds/prebuild-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,10 @@ export class PrebuildManager {
onLog: (chunk: Uint8Array) => Promise<void>,
): Promise<{ taskUrl: string } | undefined> {
const prebuild = await this.getPrebuild({}, userId, prebuildId);
const organizationId = prebuild?.info.teamId;
if (!prebuild || !organizationId) {
if (!prebuild) {
throw new ApplicationError(ErrorCodes.PRECONDITION_FAILED, "prebuild workspace not found");
}
await this.auth.checkPermissionOnProject(userId, "read_prebuild", organizationId);
await this.auth.checkPermissionOnProject(userId, "read_prebuild", prebuild.info.projectId);

const instance = await this.workspaceService.getCurrentInstance(userId, prebuild.workspace.id, {
skipPermissionCheck: true,
Expand Down
2 changes: 2 additions & 0 deletions components/server/src/projects/projects-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,10 @@ export class ProjectsService {
partialProject.settings.prebuilds.triggerStrategy = "activity-based";
}
}

return this.projectDB.updateProject(partialProject);
}

private async checkProjectSettings(userId: string, settings?: PartialProject["settings"]) {
if (!settings) {
return;
Expand Down
2 changes: 1 addition & 1 deletion components/server/src/workspace/headless-log-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class HeadlessLogService {
}
}

// we were unable to get a repsonse from supervisor - let's try content service next
// we were unable to get a response from supervisor - let's try content service next
return await this.contentServiceListLogs(wsi, ownerId);
}

Expand Down
Loading