Skip to content

Commit

Permalink
feat: make permissions field optional
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Oct 8, 2023
1 parent 5d49428 commit 86fcb49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/plugins/workspace/server/integration_tests/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ const testWorkspace: WorkspaceAttribute & {
id: 'fake_id',
name: 'test_workspace',
description: 'test_workspace_description',
permissions: {
modes: [WorkspacePermissionMode.Write, WorkspacePermissionMode.LibraryWrite],
type: 'user',
userId: '*',
},
};

describe('workspace service', () => {
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/workspace/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ const workspaceAttributesSchema = schema.object({
icon: schema.maybe(schema.string()),
reserved: schema.maybe(schema.boolean()),
defaultVISTheme: schema.maybe(schema.string()),
permissions: schema.oneOf([workspacePermission, schema.arrayOf(workspacePermission)]),
permissions: schema.maybe(
schema.oneOf([workspacePermission, schema.arrayOf(workspacePermission)])
),
});

const convertToACL = (
Expand Down

0 comments on commit 86fcb49

Please sign in to comment.