aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 43ac2aa88..4674bc0f4 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -463,7 +463,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
// adds each user to usersAdded
SharingManager.Instance.users.forEach(eachUser => {
var userOnDashboard = true;
- var permission = StrCast(target[`acl-${normalizeEmail(eachUser.user.email)}`]);
if (Doc.ActiveDashboard) {
if (Doc.ActiveDashboard['acl-' + normalizeEmail(eachUser.user.email)] == '' || Doc.ActiveDashboard['acl-' + normalizeEmail(eachUser.user.email)] == undefined) {
userOnDashboard = false;
@@ -496,9 +495,13 @@ 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') {
- const permission = StrCast(target[`acl-${StrCast(group.title)}`]);
- tableEntries.unshift(this.sharingItem(StrCast(group.title), showAdmin, permission, false));
+ if (group.title != 'Public' && Doc.ActiveDashboard) {
+ const groupKey = 'acl-' + normalizeEmail(StrCast(group.title));
+ if (Doc.ActiveDashboard[groupKey] != '' && Doc.ActiveDashboard[groupKey] != undefined) {
+ const permission = StrCast(target[groupKey]);
+ console.log(permission)
+ tableEntries.unshift(this.sharingItem(StrCast(group.title), showAdmin, permission, false));
+ }
}
});