mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 04:07:43 +02:00
Enable formatting check
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -25,6 +25,16 @@ jobs:
|
||||
run: node common/scripts/install-run-rush.js install
|
||||
- name: Rush validate
|
||||
run: node common/scripts/install-run-rush.js validate --verbose
|
||||
- name: Formatting...
|
||||
run: node common/scripts/install-run-rush.js format --force
|
||||
- name: Check files formatting
|
||||
run: |
|
||||
echo '================================================================'
|
||||
echo 'Checking for diff files'
|
||||
echo '================================================================'
|
||||
git diff '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat
|
||||
[ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat)" ]
|
||||
echo '================================================================'
|
||||
- name: Prepare server
|
||||
run: |
|
||||
cd ./tests
|
||||
|
||||
@@ -160,10 +160,15 @@ export class SpacePermissionsMiddleware extends BaseMiddleware implements Middle
|
||||
private checkPermission (ctx: MeasureContext<SessionData>, space: Ref<TypedSpace>, tx: TxCUD<Doc>): boolean {
|
||||
const account = ctx.contextData.account
|
||||
const permissions = this.permissionsBySpace[space]?.[account.uuid] ?? []
|
||||
let withoutMatch: Permission | undefined = undefined
|
||||
let withoutMatch: Permission | undefined
|
||||
for (const permission of permissions) {
|
||||
if (permission.txClass === undefined || permission.txClass !== tx._class) continue
|
||||
if (permission.objectClass !== undefined && !this.context.hierarchy.isDerived(tx.objectClass, permission.objectClass)) continue
|
||||
if (
|
||||
permission.objectClass !== undefined &&
|
||||
!this.context.hierarchy.isDerived(tx.objectClass, permission.objectClass)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
if (permission.txMatch === undefined) {
|
||||
withoutMatch = permission
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user