aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index 9fb65c251..f31213869 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -17,7 +17,6 @@ import { RefField } from './RefField';
import { SchemaHeaderField } from './SchemaHeaderField';
import { ComputedField } from './ScriptField';
import { ScriptCast, StrCast } from './Types';
-import { GroupManager } from '../client/util/GroupManager';
function _readOnlySetter(): never {
throw new Error("Documents can't be modified in read-only mode");
@@ -181,12 +180,13 @@ export function GetEffectiveAcl(target: any, user?: string): symbol {
}
/**
- * Calculates the effective access layout right to a document for the current user.
+ * Calculates the effective access layout right to a document for the current user. By getting the container's effective acl if the layout acl isn't set.
*/
export function GetEffectiveLayoutAcl(target: any, user?: string): symbol {
if (!target) return AclPrivate;
if (target[UpdatingFromServer]) return AclAdmin;
- return getEffectiveAclCache(target, user); // all changes received from the server must be processed as Admin. return this directly so that the acls aren't cached (UpdatingFromServer is not observable)
+ // if (getEffectiveAclCache(target, user)) return getEffectiveAclCache(target, user);
+ return getEffectiveAclCache(Doc.GetProto(target['embedContainer']), user);
}
function getPropAcl(target: any, prop: string | symbol | number) {