gristlabs_grist-core/app/client/ui
Paul Fitzpatrick c879393a8e (core) support adding user characteristic tables for granular ACLs
Summary:
This is a prototype for expanding the conditions that can be used in granular ACLs.

When processing ACLs, the following variables (called "characteristics") are now available in conditions:
 * UserID
 * Email
 * Name
 * Access (owners, editors, viewers)

The set of variables can be expanded by adding a "characteristic" clause.  This is a clause which specifies:
 * A tableId
 * The name of an existing characteristic
 * A colId
The effect of the clause is to expand the available characteristics with all the columns in the table, with values taken from the record where there is a match between the specified characteristic and the specified column.

Existing clauses are generalized somewhat to demonstrate and test the use these variables. That isn't the main point of this diff though, and I propose to leave generalizing+systematizing those clauses for a future diff.

Issues I'm not dealing with here:
 * How clauses combine.  (The scope on GranularAccessRowClause is a hack to save me worrying about that yet).
 * The full set of matching methods we'll allow.
 * Refreshing row access in clients when the tables mentioned in characteristic tables change.
 * Full CRUD permission control.
 * Default rules (part of combination).
 * Reporting errors in access rules.

That said, with this diff it is possible to e.g. assign a City to editors by their email address or name, and have only rows for those Cities be visible in their client. Ability to modify those rows, and remain updates about them, remains under incomplete control.

Test Plan: added tests

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2642
2020-10-19 13:33:47 -04:00
..
AccessRules.ts (core) support adding user characteristic tables for granular ACLs 2020-10-19 13:33:47 -04:00
AccountWidget.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
AddNewButton.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ApiKey.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
App.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
App.ts (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
AppHeader.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
AppUI.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
BillingForm.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
BillingPage.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
BillingPageCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
BillingPlanManagers.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
buttons.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ColumnFilterMenu.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
CustomThemes.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DocHistory.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DocMenu.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
DocMenuCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Document.css (core) move client code to core 2020-10-02 13:24:21 -04:00
DocumentSettings.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
errorPages.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ExampleCard.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ExampleInfo.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldMenus.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
FileDialog.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
forms.ts (core) Ask the user some questions after they sign up and set their name. 2020-10-15 23:36:00 -04:00
GridOptions.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
GridViewMenus.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
HomeImports.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
HomeIntro.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
HomeLeftPane.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
LeftPanelCommon.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
MakeCopyMenu.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
modals.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
mouseDrag.ts Initial config with a few files that build on client and server side. 2020-05-20 00:50:46 -04:00
MultiSelector.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
NotifyUI.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PagePanels.ts (core) Implement 'Print widget' option to print individual view sections. 2020-10-10 00:35:33 -04:00
Pages.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PageWidgetPicker.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PinnedDocs.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ProfileDialog.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
resizeHandle.ts Initial config with a few files that build on client and server side. 2020-05-20 00:50:46 -04:00
RightPanel.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
selectBy.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
shadowScroll.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ShareMenu.ts (core) switch to newer download endpoint in client 2020-10-19 12:44:03 -04:00
Tools.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
tooltips.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TopBar.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TopBarCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
transientInput.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
transitions.ts (core) Show a welcome card when a user opens an example for the first time. 2020-09-09 23:08:50 -04:00
TreeViewComponent.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TreeViewComponentCss.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
UserImage.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
UserManager.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewLayoutMenu.ts (core) Implement 'Print widget' option to print individual view sections. 2020-10-10 00:35:33 -04:00
ViewSectionMenu.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
VisibleFieldsConfig.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
WelcomePage.ts (core) Fix WelcomePage to use an explicit action URL, and parse submitted body in time to log it with errors. 2020-10-19 11:40:39 -04:00
widgetTypes.ts (core) move client code to core 2020-10-02 13:24:21 -04:00