diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-30 14:07:31 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-30 14:07:31 +0530 |
| commit | 5befdda055c9f22b8c8f12184d8db6424d130669 (patch) | |
| tree | f324cb85090d4ad6eac4a6bc0e1efff4e37a5371 /src/client/views/DocComponent.tsx | |
| parent | 04a2b4ff8ef0a1c77391f017693e19da03896c7b (diff) | |
| parent | cb18f848b44705a25f786f9a0e678095101f9e01 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/DocComponent.tsx')
| -rw-r--r-- | src/client/views/DocComponent.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx index dad48d002..893b74d75 100644 --- a/src/client/views/DocComponent.tsx +++ b/src/client/views/DocComponent.tsx @@ -123,7 +123,8 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T @action.bound removeDocument(doc: Doc | Doc[]): boolean { const effectiveAcl = GetEffectiveAcl(this.dataDoc); - if (effectiveAcl === AclAdmin || effectiveAcl === AclEdit) { + const docAcl = GetEffectiveAcl(doc); + if (effectiveAcl === AclEdit || effectiveAcl === AclAdmin || docAcl === AclAdmin) { const docs = doc instanceof Doc ? [doc] : doc; docs.map(doc => doc.isPushpin = doc.annotationOn = undefined); const targetDataDoc = this.dataDoc; @@ -166,7 +167,8 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T added.forEach(d => { for (const [key, value] of Object.entries(this.props.Document[AclSym])) { if (d.author === key.substring(4).replace("_", ".") && !d.aliasOf) distributeAcls(key, SharingPermissions.Admin, d, true); - else distributeAcls(key, this.AclMap.get(value) as SharingPermissions, d, true); + //else if (this.props.Document[key] === SharingPermissions.Admin) distributeAcls(key, SharingPermissions.Add, d, true); + // else distributeAcls(key, this.AclMap.get(value) as SharingPermissions, d, true); } }); } |
