gristlabs_grist-core/app
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
..
client (core) go ahead and create fork if non-owner wants to do "View As" on prefork 2021-12-10 14:45:36 -05:00
common (core) Refactor more value parsing code into common 2021-12-09 21:05:27 +02:00
gen-server (core) freshen grist-admin doc-info and add a test for it 2021-12-10 13:07:34 -05:00
plugin (core) Parsing multiple values in reflists, parsing refs without table data in client 2021-11-09 14:41:04 +02:00
server (core) Update HelpScout beacon to work with embedded documentation articles. 2021-12-09 22:22:55 -05:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00