aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-08-30 14:42:51 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-08-30 14:42:51 +0530
commit204c978c09ef749c02e43604966d861c79b6f5ed (patch)
tree73cfa54dae3b33e4192846efc8ad83f321ebfb73 /src/fields/util.ts
parent4d1c5e5060db6aafc0689f0c83a757def1d30ca1 (diff)
changes for multiple docs selected + other small changes
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index 9679527e4..069f01195 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -183,7 +183,8 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number,
for (const [key, value] of Object.entries(target[AclSym])) {
// there are issues with storing fields with . in the name, so they are replaced with _ during creation
// as a result we need to restore them again during this comparison.
- if (currentUserGroups.includes(key.substring(4).replace("_", ".")) || userChecked === key.substring(4).replace("_", ".")) {
+ const entity = key.substring(4).replace('_', '.'); // an individual or a group
+ if (currentUserGroups.includes(entity) || userChecked === entity) {
if (HierarchyMapping.get(value as symbol)! > HierarchyMapping.get(effectiveAcl)!) {
effectiveAcl = value as symbol;
if (effectiveAcl === AclAdmin) break;