gristlabs_grist-core/app/client/aclui
Paul Fitzpatrick accd640078 (core) add a user.SessionID value for trigger formulas and granular access rules
Summary:
This makes a `user.SessionID` value available in information about the user, for use with trigger formulas and granular access rules. The ID should be constant within a browser session for anonymous user. For logged in users it simply reflects their user id.

This ID makes it possible to write access rules and trigger formulas that allow different anonymous users to create, view, and edit their own records in a document.

For example, you could have a brain-storming document for puns, and allow anyone to add to it (without logging in), letting people edit their own records, but not showing the records to others until they are approved by a moderator. Without something like this, we could only let anonymous people add one field of a record, and not have a secure way to let them edit that field or others in the same record.

Also adds a `user.IsLoggedIn` flag in passing.

Test Plan: Added a test, updated tests. The test added is a mini-moderation doc, don't use it for real because it allows users to edit their entries after a moderator has approved them.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3273
2022-02-22 12:50:43 -05:00
..
AccessRules.ts (core) add a user.SessionID value for trigger formulas and granular access rules 2022-02-22 12:50:43 -05: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 (core) One more phase of ACL UI revision. 2020-12-22 22:18:12 -05:00
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 Correct spelling mistakes 2022-02-19 09:46:49 +00:00