mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Don't show hidden tables in table data options when adding widgets
Summary: As reported in https://grist.slack.com/archives/C069RUP71/p1655316194602829, when a table is hidden by ACL, it was still showing as a blank 'ghost' option to select data when adding a widget: {F55498} The fix is simply to return `true` from `isHiddenTable` for empty table IDs, which indicate a table hidden by ACL. `TableRec.isHidden` is supposed to match this so I updated it too, and I cleaned up a tiny bit of other related code. Test Plan: Extended `nbrowser/AccessRules1.ts` to test the data options when adding widgets. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3530
This commit is contained in:
@@ -902,6 +902,11 @@ export async function addNewSection(typeRe: RegExp|string, tableRe: RegExp|strin
|
||||
await selectWidget(typeRe, tableRe, options);
|
||||
}
|
||||
|
||||
export async function openAddWidgetToPage() {
|
||||
await driver.findWait('.test-dp-add-new', 2000).doClick();
|
||||
await driver.findWait('.test-dp-add-widget-to-page', 2000).doClick();
|
||||
}
|
||||
|
||||
// Select type and table that matches respectively typeRe and tableRe and save. The widget picker
|
||||
// must be already opened when calling this function.
|
||||
export async function selectWidget(
|
||||
|
||||
Reference in New Issue
Block a user