diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:47:31 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:47:31 -0400 |
commit | 40579c8b3cf0504ac10e966e640af58e8876acd3 (patch) | |
tree | cc280d53b66d244eae6bd1e5c5d00a0d6b1dc3ea /src/client/views/PropertiesView.tsx | |
parent | e31f6403bc62faea72767f68d3bf34ac8bd28183 (diff) | |
parent | d92775bffab6470dc6142e02092b7cae2c30b5ff (diff) |
Merge branch 'collaboration-sarah' of https://github.com/brown-dash/Dash-Web into collaboration-sarah
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index abbf9a22e..43ac2aa88 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -393,19 +393,19 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { colorACLDropDown(name: string, admin: boolean, permission: string, showExpansionIcon?: boolean) { var dropDownText = ''; switch (StrCast(permission)) { - case 'Admin': + case SharingPermissions.Admin: dropDownText = '⬢ '; break; - case 'Edit': + case SharingPermissions.Edit: dropDownText = '⬢ '; break; - case 'Augment': + case SharingPermissions.Augment: dropDownText = '⬟ '; break; - case 'View': + case SharingPermissions.View: dropDownText = '♦ '; break; - case 'Not-Shared': + case SharingPermissions.None: dropDownText = '▲ '; break; } @@ -454,9 +454,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { // const effectiveAcls = GetEffectiveAcl(target); // const showAdmin = effectiveAcls == AclAdmin || docToUse!['acl-' + normalizeEmail(Doc.CurrentUserEmail)] == 'Owner'; - const curUserAcl = docToUse!['acl-' + normalizeEmail(Doc.CurrentUserEmail)] - const showAdmin = curUserAcl == 'Admin' || curUserAcl == 'Owner' - + const curUserAcl = docToUse!['acl-' + normalizeEmail(Doc.CurrentUserEmail)]; + const showAdmin = curUserAcl == 'Admin' || curUserAcl == 'Owner'; + const tableEntries = []; const usersAdded: string[] = []; // all shared users being added - organized by denormalized email @@ -496,11 +496,11 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { const commonKeys = intersection(...docs.map(doc => (this.layoutDocAcls ? doc : doc[DocData])).map(doc => doc?.[DocAcl] && Object.keys(doc[DocAcl]))); const groupListMap: (Doc | { title: string })[] = groups.filter(({ title }) => (docs.length > 1 ? commonKeys.includes(`acl-${normalizeEmail(StrCast(title))}`) : true)); groupListMap.map(group => { - if (group.title != 'Public'){ + if (group.title != 'Public') { const permission = StrCast(target[`acl-${StrCast(group.title)}`]); tableEntries.unshift(this.sharingItem(StrCast(group.title), showAdmin, permission, false)); } - }) + }); // shift owner to top tableEntries.unshift(this.sharingItem(StrCast(target.author), showAdmin, 'Owner'), false); |