Skip to content
Open
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
2 changes: 0 additions & 2 deletions apps/server/src/auth/RpcAuthorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
AuthProvidersManageScope,
AuthEnvironmentMaintainScope,
AuthFilesystemReadScope,
AuthFilesystemWriteScope,
AuthDiagnosticsReadScope,
AuthOrchestrationOperateScope,
AuthOrchestrationReadScope,
Expand Down Expand Up @@ -154,7 +153,6 @@ export const RPC_REQUIRED_SCOPES = {
[WS_METHODS.projectsReadFile]: AuthFilesystemReadScope,
[WS_METHODS.projectsSearchContents]: AuthFilesystemReadScope,
[WS_METHODS.projectsSearchEntries]: AuthFilesystemReadScope,
[WS_METHODS.projectsWriteFile]: AuthFilesystemWriteScope,
[WS_METHODS.projectsEnsureScratch]: AuthOrchestrationOperateScope,
[WS_METHODS.projectsCreateNew]: AuthOrchestrationOperateScope,
[WS_METHODS.shellOpenInEditor]: AuthOrchestrationOperateScope,
Expand Down
2 changes: 2 additions & 0 deletions packages/client-runtime/src/state/commandPermissions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
AuthAccessReadScope,
AuthAccessWriteScope,
AuthEnvironmentMaintainScope,
AuthFilesystemWriteScope,
AuthOrchestrationOperateScope,
AuthOrchestrationReadScope,
AuthPreviewOperateScope,
Expand Down Expand Up @@ -155,6 +156,7 @@ describe("command permissions", () => {
it.effect.each([
{ method: WS_METHODS.serverRunStorageCleanup, scope: AuthSettingsWriteScope },
{ method: WS_METHODS.serverReclaimDatabaseSpace, scope: AuthEnvironmentMaintainScope },
{ method: WS_METHODS.projectsWriteFile, scope: AuthFilesystemWriteScope },
])("requires the destination $scope grant for $method", ({ method, scope }) =>
Effect.gen(function* () {
const registry = yield* setup;
Expand Down
1 change: 1 addition & 0 deletions packages/client-runtime/src/state/projectCommands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const makeHarness = Effect.fn("TestProjectCommands.makeHarness")(function* () {
});
const registry = AtomRegistry.make();
yield* Effect.addFinalizer(() => Effect.sync(() => registry.dispose()));
registry.mount(sessions(ENVIRONMENT_ID));
registry.set(
sessions(ENVIRONMENT_ID),
AsyncResult.success({
Expand Down
2 changes: 2 additions & 0 deletions packages/contracts/src/clientRpcPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GitPreparePullRequestThreadInput, GitRunStackedActionInput } from "./gi
import {
AuthAccessWriteScope,
AuthEnvironmentMaintainScope,
AuthFilesystemWriteScope,
AuthOrchestrationOperateScope,
AuthOrchestrationReadScope,
AuthPreviewOperateScope,
Expand Down Expand Up @@ -42,6 +43,7 @@ export const CLIENT_GUARDED_RPC_SCOPES = {
[WS_METHODS.pullRequestsSetLabels]: AuthSourceControlWriteScope,
// Writing a guide runs a model on this environment's providers, which reading one does not.
[WS_METHODS.pullRequestsGenerateReviewGuide]: AuthOrchestrationOperateScope,
[WS_METHODS.projectsWriteFile]: AuthFilesystemWriteScope,
[WS_METHODS.projectsCreateFromThread]: AuthOrchestrationOperateScope,
[WS_METHODS.sourceControlCloneRepository]: AuthSourceControlWriteScope,
[WS_METHODS.sourceControlPublishRepository]: AuthSourceControlWriteScope,
Expand Down
Loading