aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-09-25 01:29:05 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-09-25 01:29:05 +0530
commitbc45c96768a24a5c9b9735d610d407e856b05744 (patch)
treeea1aa2ecbf2d8e0d1aec38f045d93ff71162f646 /src
parent37089281d5283d685e39ce922d2fe89e4c78f0d4 (diff)
override related changes. more to go
Diffstat (limited to 'src')
-rw-r--r--src/client/views/PropertiesView.tsx1
-rw-r--r--src/fields/util.ts5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 9209cc21a..6aad94131 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -320,6 +320,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
getPermissionsSelect(user: string, permission: string) {
const dropdownValues: string[] = Object.values(SharingPermissions);
if (permission === "-multiple-") dropdownValues.unshift(permission);
+ if (name === "Override") dropdownValues.unshift("Unset");
return <select className="permissions-select"
value={permission}
onChange={e => this.changePermissions(e, user)}>
diff --git a/src/fields/util.ts b/src/fields/util.ts
index c055be132..20ba1ca39 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -189,13 +189,12 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number,
if (currentUserGroups.includes(entity) || userChecked === entity) {
if (HierarchyMapping.get(value as symbol)! > HierarchyMapping.get(effectiveAcl)!) {
effectiveAcl = value as symbol;
- if (effectiveAcl === AclAdmin) break;
+ if (effectiveAcl === AclAdmin) return effectiveAcl;
}
}
}
- // if there's an overriding acl set through the properties panel or sharing menu, that's what's returned.
- // if it's unset, it just goes ahead
+ // if there's an overriding acl set through the properties panel or sharing menu, that's what's returned if the user isn't an admin of the document
const override = target[AclSym]["acl-Override"];
if (override !== AclUnset && override !== undefined) effectiveAcl = target[AclSym]["acl-Override"];