From 763b77af1127f6dd0313d4d5e13cbb6f7e6be211 Mon Sep 17 00:00:00 2001 From: srichman333 Date: Wed, 21 Jun 2023 18:00:13 -0400 Subject: uses acl from container for layout functions --- src/client/views/DocumentDecorations.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/client') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index c4c6b6488..db164a33a 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -164,9 +164,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P @action onContainerDown = (e: React.PointerEvent): void => { const first = SelectionManager.Views()[0]; - const effectiveAcl = GetEffectiveAcl(first.rootDoc); - console.log(GetEffectiveLayoutAcl(first)) - if (effectiveAcl == AclAdmin || effectiveAcl == AclEdit || effectiveAcl == AclAugment) { + const effectiveLayoutAcl = GetEffectiveLayoutAcl(first.rootDoc); + if (effectiveLayoutAcl == AclAdmin || effectiveLayoutAcl == AclEdit || effectiveLayoutAcl == AclAugment) { setupMoveUpEvents( this, e, @@ -179,8 +178,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P @action onTitleDown = (e: React.PointerEvent): void => { const first = SelectionManager.Views()[0]; - const effectiveAcl = GetEffectiveAcl(first.rootDoc); - if (effectiveAcl == AclAdmin || effectiveAcl == AclEdit || effectiveAcl == AclAugment) { + const effectiveLayoutAcl = GetEffectiveLayoutAcl(first.rootDoc); + if (effectiveLayoutAcl == AclAdmin || effectiveLayoutAcl == AclEdit || effectiveLayoutAcl == AclAugment) { setupMoveUpEvents( this, e, @@ -200,8 +199,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P @action onBackgroundMove = (dragTitle: boolean, e: PointerEvent): boolean => { const first = SelectionManager.Views()[0]; - const effectiveAcl = GetEffectiveAcl(first.rootDoc); - if (effectiveAcl != AclAdmin && effectiveAcl != AclEdit && effectiveAcl != AclAugment){ + const effectiveLayoutAcl = GetEffectiveLayoutAcl(first.rootDoc); + if (effectiveLayoutAcl != AclAdmin && effectiveLayoutAcl != AclEdit && effectiveLayoutAcl != AclAugment){ return false; } const dragDocView = SelectionManager.Views()[0]; -- cgit v1.2.3-70-g09d2