gristlabs_grist-core/app/client/models/entities
Alex Hall ecf2fdf71a (core) Fix summary table titles and linking when source table is hidden by ACL
Summary:
Two summary table widgets that share a source table and have compatible groupby columns can be filter linked. This diff fixes a bug where this linking is broken when the source table is hidden by access rules. The source table data isn't needed for the linking, but its metadata is, and that metadata is censored by GranularAccess. To deal with this:

- `LinkConfig._assertValid` allows blank `tableId`s specifically for linking two summary tables.
- `LinkingState.filterColValues` gets the `colId`s of groupby columns from the summary table columns rather than the source table.

A closely related problem is that the titles of summary tables are incomplete when the source table is hidden, e.g. they just say `[by A]` instead of `Table1 [by A]`. To fix this, the raw view sections of source tables are 'uncensored' in GranularAccess.

Initially I also planned to uncensor the tableId of the source table, which seemed like a better and more general fix for the blank tableId problem. But several parts of client code use blank tableIds to know that a table should be hidden, so they were left as is.

Test Plan: Added an nbrowser test for summary table linking, and a server test for uncensoring the raw view section in GranularAccess.

Reviewers: georgegevoian, paulfitz

Reviewed By: georgegevoian, paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3608
2022-09-01 19:14:47 +02:00
..
ACLRuleRec.ts (core) make AccessRules and FullCopies effective 2021-03-25 15:05:26 -04:00
ColumnRec.ts (core) Show summary tables on Raw Data page 2022-07-06 09:41:48 -07:00
DocInfoRec.ts (core) Filter out pages for hidden views from the page list. 2021-08-27 13:51:57 -04:00
FilterRec.ts (core) Allow filtering hidden columns 2021-11-22 10:26:08 -08:00
PageRec.ts (core) Don't show hidden tables in table data options when adding widgets 2022-07-21 16:28:28 +02:00
TabBarRec.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
TableRec.ts (core) Don't show hidden tables in table data options when adding widgets 2022-07-21 16:28:28 +02:00
ValidationRec.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewFieldRec.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
ViewRec.ts (core) Initial data tables page 2022-02-10 12:46:19 +02:00
ViewSectionRec.ts (core) Fix summary table titles and linking when source table is hidden by ACL 2022-09-01 19:14:47 +02:00