gristlabs_grist-core/app/client
Paul Fitzpatrick 307966e84f (core) go ahead and create fork if non-owner wants to do "View As" on prefork
Summary:
Backstory: to make examples easier to play with, we:
 * Add a special FullCopies permission to let anyone fork/copy them regardless of other access rules
 * Open the examples in "prefork" mode by default
That means a random person can open an example and already feel like an owner of it. Getting to this point requires some gymnastics on the back end. As soon as the person makes any change to the document they become truly the owner (of their fork), and life is simple for the back end.

But, if that person does "View As" to look at the preforked document, that is a step too far for the back end - a user, with a special somewhat complicated exception allowing them to act as an owner for some purposes, now wants to pretend to be another user. The logic for this on the back end was doable, but looked hard to review and be confident of, with now three identities with subtle nuances in their interrelationship.

So with this diff, if a non-owner attempts to "View As" another user on a prefork, the client will just fork the document first. This is in principle not necessary, but is much simpler from a security perspective.

Test Plan: extended test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3179
2021-12-10 14:45:36 -05:00
..
aclui (core) go ahead and create fork if non-owner wants to do "View As" on prefork 2021-12-10 14:45:36 -05:00
components (core) Refactor more value parsing code into common 2021-12-09 21:05:27 +02:00
lib (core) Update HelpScout beacon to work with embedded documentation articles. 2021-12-09 22:22:55 -05:00
models (core) Refactor more value parsing code into common 2021-12-09 21:05:27 +02:00
ui (core) Update HelpScout beacon to work with embedded documentation articles. 2021-12-09 22:22:55 -05:00
ui2018 (core) JS error on creator panel and formula editor. 2021-11-30 14:28:22 +01:00
widgets (core) Refactor more value parsing code into common 2021-12-09 21:05:27 +02:00
app.css (core) Make mobile the default mode. 2021-02-25 11:31:43 -05:00
app.js (core) Disable bfcache for all browsers 2021-11-24 09:47:00 -08:00
declarations.d.ts (core) Update grainjs, fix some code affected by stronger types. 2021-12-07 17:31:03 -05:00
errorMain.ts (core) clean up a collection of small problems affecting grist-core 2021-08-17 21:44:50 -04:00
exposeModulesForTests.js (core) Some cleanup: remove old unused modules. 2020-11-20 11:23:20 -05:00
logo.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
tsconfig.json freshen app/client/ui2018/cssVars.ts 2020-06-23 16:16:38 -04:00