aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-07 15:57:51 -0400
committerbobzel <zzzman@gmail.com>2023-07-07 15:57:51 -0400
commitcf88809ea2299395db70ce608c193df7f24f0fb2 (patch)
tree57206a4b1281410a4371c5ae4616d388e1d694b7 /src/client/DocServer.ts
parent0f0d646e45de42c7f84f6fa316c80d1413f92e5c (diff)
fixed self-ownership of copied Docs created by someone else. prevent dash from being pasted into itself. fixed inheritance of acls
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 8b8a9a618..67be96d13 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -198,7 +198,7 @@ export namespace DocServer {
export namespace Control {
let _isReadOnly = false;
export function makeReadOnly() {
- if (!_isReadOnly) {
+ if (!Control.isReadOnly()) {
_isReadOnly = true;
_CreateField = field => (_cache[field[Id]] = field);
_UpdateField = emptyFunction;
@@ -207,7 +207,7 @@ export namespace DocServer {
}
export function makeEditable() {
- if (_isReadOnly) {
+ if (Control.isReadOnly() && Doc.CurrentUserEmail !== 'guest') {
location.reload();
// _isReadOnly = false;
// _CreateField = _CreateFieldImpl;
@@ -218,7 +218,7 @@ export namespace DocServer {
}
export function isReadOnly() {
- return _isReadOnly;
+ return _isReadOnly || Doc.CurrentUserEmail === 'guest';
}
}