gristlabs_grist-core/app/plugin
Alex Hall 225a76c9cb (core) Don't throw error in onRecord(s) for insufficient access for includeColumns
Summary:
This removes checking for full access in `onRecord/onRecords` when `includeColumns` is a non-default value. The check had two problems:

1. It relied on the access level being present in the URL query parameters, which doesn't work if the page has redirected. See the discussion in https://grist.slack.com/archives/C0234CPPXPA/p1702576602615509. There seems to be no way to reliably and synchronously check the access level.
2. Calling `onRecords` before `ready` and forgetting to handle an error from the access check meant that `ready` wouldn't be called, so Grist couldn't request the correct access level from the user. I made this mistake and it seems like a nasty footgun.

Ultimately this has no effect on security, as an error will still be raised, but in a place where the widget developer can't catch it. They'll still see an error message in the console, and they can still check the access level reliably using `onOptions`, so I think this is OK.

Test Plan: Updated nbrowser test

Reviewers: georgegevoian, paulfitz

Reviewed By: georgegevoian, paulfitz

Differential Revision: https://phab.getgrist.com/D4145
2023-12-30 10:16:40 +02:00
..
CustomSectionAPI-ti.ts (core) Move theme from ConfigNotifier to ThemeNotifier 2023-10-10 21:45:10 -04:00
CustomSectionAPI.ts (core) Move theme from ConfigNotifier to ThemeNotifier 2023-10-10 21:45:10 -04:00
DocApiTypes-ti.ts add an endpoint for doing SQL selects (#641) 2023-09-04 09:21:18 -04:00
DocApiTypes.ts add an endpoint for doing SQL selects (#641) 2023-09-04 09:21:18 -04:00
FileParserAPI-ti.ts (core) Improve encoding detection for csv imports, and make encoding an editable option. 2023-08-24 09:50:52 -04:00
FileParserAPI.ts (core) Improve encoding detection for csv imports, and make encoding an editable option. 2023-08-24 09:50:52 -04:00
grist-plugin-api.ts (core) Don't throw error in onRecord(s) for insufficient access for includeColumns 2023-12-30 10:16:40 +02:00
GristAPI-ti.ts (core) Options for plugin API functions which fetch data from the selected table or record 2023-10-26 23:46:00 +02:00
GristAPI.ts (core) Options for plugin API functions which fetch data from the selected table or record 2023-10-26 23:46:00 +02:00
GristData-ti.ts (core) Update Plugin API documentation 2022-05-24 17:27:34 -07:00
GristData.ts (core) flesh out getAccessToken API documentation 2022-07-28 08:50:12 -04:00
GristTable-ti.ts (core) add grist.onRecord and grist.onRecords event handlers 2020-08-13 14:34:23 -04:00
GristTable.ts (core) Update Plugin API documentation 2022-05-24 17:27:34 -07:00
gutil.ts (core) add grist.selectedTable.create/update/destroy/upsert to custom widget api 2022-03-15 11:11:58 -04:00
ImportSourceAPI-ti.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
ImportSourceAPI.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
InternalImportSourceAPI-ti.ts (core) Adding schema validation for records endpoint 2021-10-18 21:40:50 +02:00
InternalImportSourceAPI.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
objtypes.ts Use relative imports only in plugin folder (#328) 2022-10-26 10:41:38 -04:00
PluginManifest-ti.ts (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
PluginManifest.ts (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
README.md (core) configure typedoc for generating plugin api documentation 2022-04-04 18:11:33 -04:00
RenderOptions-ti.ts (core) Adding schema validation for records endpoint 2021-10-18 21:40:50 +02:00
RenderOptions.ts (core) configure typedoc for generating plugin api documentation 2022-04-04 18:11:33 -04:00
StorageAPI-ti.ts (core) Adding schema validation for records endpoint 2021-10-18 21:40:50 +02:00
StorageAPI.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
TableOperations.ts Use relative imports only in plugin folder (#328) 2022-10-26 10:41:38 -04:00
TableOperationsImpl.ts DocApi: Implement DELETE on columns (#601) (#640) 2023-08-24 14:33:53 +02:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00
TypeCheckers.ts (core) Speed up and upgrade build. 2022-06-27 16:10:10 -04:00
WidgetAPI-ti.ts (core) Widget options api 2022-01-13 11:10:17 +01:00
WidgetAPI.ts (core) Widget options api 2022-01-13 11:10:17 +01:00

Methods here are available for use in Grist custom widgets.