gristlabs_grist-core/app/client/aclui
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
..
AccessRules.ts (core) Use MetaTableData more 2021-12-07 17:09:58 +02:00
ACLColumnList.ts (core) Add getAclResources method for making all tables/columns available when editing ACL rules 2021-01-14 13:43:55 -05:00
ACLFormulaEditor.ts (core) Change user attribute from select to formula, especially to allow link keys 2021-05-21 12:22:55 +02:00
ACLSelect.ts
ACLUsers.ts (core) go ahead and create fork if non-owner wants to do "View As" on prefork 2021-12-10 14:45:36 -05:00
PermissionsWidget.ts (core) alert user if they try to use rec in a column rule controlling read permission 2021-03-10 11:57:09 -05:00