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.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 5e1c80f0c..f4ded8367 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -231,7 +231,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
@computed get noviceFields() {
const noviceReqFields = ['author', 'author_date', 'tags', '_layout_curPage'];
- return this.editableFields(key => key.indexOf('modificationDate') !== -1 || (key[0] === key[0].toUpperCase() && !key.startsWith('acl')), noviceReqFields);
+ return this.editableFields(key => key.indexOf('modificationDate') !== -1 || (key[0] === key[0].toUpperCase() && !key.startsWith('acl_')), noviceReqFields);
}
@undoBatch
@@ -473,7 +473,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
SharingManager.Instance.users.forEach(eachUser => {
let userOnDoc = true;
if (seldoc) {
- if (Doc.GetT(seldoc, 'acl-' + normalizeEmail(eachUser.user.email), 'string', true) === '' || Doc.GetT(seldoc, 'acl-' + normalizeEmail(eachUser.user.email), 'string', true) === undefined) {
+ if (Doc.GetT(seldoc, 'acl_' + normalizeEmail(eachUser.user.email), 'string', true) === '' || Doc.GetT(seldoc, 'acl_' + normalizeEmail(eachUser.user.email), 'string', true) === undefined) {
userOnDoc = false;
}
}
@@ -485,7 +485,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
// sorts and then adds each user to the table
usersAdded.sort(this.sortUsers);
usersAdded.forEach(userEmail => {
- const userKey = `acl-${normalizeEmail(userEmail)}`;
+ const userKey = `acl_${normalizeEmail(userEmail)}`;
const aclField = Doc.GetT(this.layoutDocAcls ? target : Doc.GetProto(target), userKey, 'string', true);
const permission = StrCast(aclField);
individualTableEntries.unshift(this.sharingItem(userEmail, showAdmin, permission!, false)); // adds each user
@@ -494,7 +494,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
// adds current user
let userEmail = ClientUtils.CurrentUserEmail();
if (userEmail === 'guest') userEmail = 'Guest';
- const userKey = `acl-${normalizeEmail(userEmail)}`;
+ const userKey = `acl_${normalizeEmail(userEmail)}`;
if (!usersAdded.includes(userEmail) && userEmail !== 'Guest' && userEmail !== target.author) {
let permission;
if (this.layoutDocAcls) {
@@ -514,7 +514,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
groupList.sort(this.sortGroups);
groupList.forEach(group => {
if (group.title !== 'Guest' && this.selectedDoc) {
- const groupKey = 'acl-' + normalizeEmail(StrCast(group.title));
+ const groupKey = 'acl_' + normalizeEmail(StrCast(group.title));
if (this.selectedDoc[groupKey] !== '' && this.selectedDoc[groupKey] !== undefined) {
let permission;
if (this.layoutDocAcls) {
@@ -529,7 +529,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
});
// guest permission
- const guestPermission = StrCast((this.layoutDocAcls ? target : Doc.GetProto(target))['acl-Guest']);
+ const guestPermission = StrCast((this.layoutDocAcls ? target : Doc.GetProto(target)).acl_Guest);
return (
<div>
@@ -1733,8 +1733,8 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
}
if (this.isPres && PresBox.Instance) {
const selectedItem: boolean = PresBox.Instance.selectedArray.size > 0;
- const type = [DocumentType.AUDIO, DocumentType.VID].includes(DocCast(PresBox.Instance.activeItem?.annotationOn)?.type as any as DocumentType)
- ? (DocCast(PresBox.Instance.activeItem?.annotationOn)?.type as any as DocumentType)
+ const type = [DocumentType.AUDIO, DocumentType.VID].find(dt => dt === DocCast(PresBox.Instance.activeItem?.annotationOn)?.type)
+ ? DocCast(PresBox.Instance.activeItem?.annotationOn)?.type
: PresBox.targetRenderedDoc(PresBox.Instance.activeItem)?.type;
return (
<div className="propertiesView" style={{ width: this._props.width }}>