mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) freshen "view as user" behavior
Summary: Now as the user an owner might choose to view their document as is likely to not have access to rules, it is better to start viewing on the default document page rather than /p/acl. The "Access Rules" link is grayed out when in "view as" mode for now (improvements are planned). Test Plan: updated test Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2743
This commit is contained in:
@@ -382,7 +382,7 @@ export class DocManager extends EventEmitter {
|
||||
for (;;) {
|
||||
if (this._activeDocs.has(docName) && wantRecoveryMode !== undefined) {
|
||||
const activeDoc = await this._activeDocs.get(docName);
|
||||
if (activeDoc && activeDoc.recoveryMode !== wantRecoveryMode && activeDoc.isOwner(docSession)) {
|
||||
if (activeDoc && activeDoc.recoveryMode !== wantRecoveryMode && await activeDoc.isOwner(docSession)) {
|
||||
// shutting doc down to have a chance to re-open in the correct mode.
|
||||
// TODO: there could be a battle with other users opening it in a different mode.
|
||||
await activeDoc.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user