Skip to content

Commit 9698bef

Browse files
committed
Enable formatting check
Signed-off-by: Andrey Sobolev <[email protected]>
1 parent b124372 commit 9698bef

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ jobs:
2525
run: node common/scripts/install-run-rush.js install
2626
- name: Rush validate
2727
run: node common/scripts/install-run-rush.js validate --verbose
28+
- name: Formatting...
29+
run: node common/scripts/install-run-rush.js format --force
30+
- name: Check files formatting
31+
run: |
32+
echo '================================================================'
33+
echo 'Checking for diff files'
34+
echo '================================================================'
35+
git diff '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat
36+
[ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat)" ]
37+
echo '================================================================'
2838
- name: Prepare server
2939
run: |
3040
cd ./tests

packages/middleware/src/spacePermissions.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,15 @@ export class SpacePermissionsMiddleware extends BaseMiddleware implements Middle
160160
private checkPermission (ctx: MeasureContext<SessionData>, space: Ref<TypedSpace>, tx: TxCUD<Doc>): boolean {
161161
const account = ctx.contextData.account
162162
const permissions = this.permissionsBySpace[space]?.[account.uuid] ?? []
163-
let withoutMatch: Permission | undefined = undefined
163+
let withoutMatch: Permission | undefined
164164
for (const permission of permissions) {
165165
if (permission.txClass === undefined || permission.txClass !== tx._class) continue
166-
if (permission.objectClass !== undefined && !this.context.hierarchy.isDerived(tx.objectClass, permission.objectClass)) continue
166+
if (
167+
permission.objectClass !== undefined &&
168+
!this.context.hierarchy.isDerived(tx.objectClass, permission.objectClass)
169+
) {
170+
continue
171+
}
167172
if (permission.txMatch === undefined) {
168173
withoutMatch = permission
169174
continue

0 commit comments

Comments
 (0)