mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) lock down modification of the _grist_Attachments table
Summary: Rows in the _grist_Attachments table have a special lifecycle, being created by a special method, and deleted via a special process. All other modifications are now rejected, for simplicity. Test Plan: added test Reviewers: dsagal, jarek Reviewed By: dsagal, jarek Differential Revision: https://phab.getgrist.com/D3712
This commit is contained in:
@@ -844,7 +844,9 @@ export class ActiveDoc extends EventEmitter {
|
||||
);
|
||||
const userActions: UserAction[] = await Promise.all(
|
||||
upload.files.map(file => this._prepAttachment(docSession, file)));
|
||||
const result = await this.applyUserActions(docSession, userActions);
|
||||
const result = await this._applyUserActionsWithExtendedOptions(docSession, userActions, {
|
||||
attachment: true,
|
||||
});
|
||||
this._updateAttachmentsSize().catch(e => {
|
||||
this._log.warn(docSession, 'failed to update attachments size', e);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user