aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-06-21 18:00:13 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-06-21 18:00:13 -0400
commit763b77af1127f6dd0313d4d5e13cbb6f7e6be211 (patch)
tree206576e9bd0cb2d608ef27911594c2ff1d758e87 /src/client/views/DocumentDecorations.tsx
parent442c22e55bf4e53e57378980e7831cfea035d52a (diff)
uses acl from container for layout functions
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx13
1 files changed, 6 insertions, 7 deletions
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];