Skip to content

Commit e16f96c

Browse files
committed
fix: check table exists before access
1 parent 5527518 commit e16f96c

File tree

1 file changed

+2
-2
lines changed
  • packages/backend/src/apps/tiles/actions/create-row

1 file changed

+2
-2
lines changed

packages/backend/src/apps/tiles/actions/create-row/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ const action: IRawAction = {
9494
rowData: { columnId: string; cellValue: string }[]
9595
}
9696

97-
await TableCollaborator.hasAccess($.user?.id, tableId, 'editor', $)
98-
9997
const table = await TableMetadata.query().findById(tableId)
10098
if (!table) {
10199
throw new StepError(
@@ -106,6 +104,8 @@ const action: IRawAction = {
106104
)
107105
}
108106

107+
await TableCollaborator.hasAccess($.user?.id, tableId, 'editor', $)
108+
109109
/**
110110
* convert array to object
111111
* [{columnId: 'abc', cellValue: 'test'}] => {abc: 'test'}

0 commit comments

Comments
 (0)