gristlabs_grist-core/app
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
..
client (core) add a user.SessionID value for trigger formulas and granular access rules 2022-02-22 12:50:43 -05:00
common (core) Skip /welcome/user page for new users 2022-02-22 08:38:22 -08:00
gen-server (core) Add account page option to allow Google login 2022-02-14 16:56:23 -08:00
plugin Correct spelling mistakes 2022-02-19 09:46:49 +00:00
server (core) add a user.SessionID value for trigger formulas and granular access rules 2022-02-22 12:50:43 -05:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00