(core) refactor assertCanMaybeApplyUserActions

Summary: This refactors assertCanMaybeApplyUserActions for clarity.

Test Plan: existing tests pass, added test

Reviewers: dsagal, jarek

Reviewed By: dsagal, jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3637
This commit is contained in:
Paul Fitzpatrick
2022-09-27 13:01:34 -04:00
parent d140b49ba3
commit a5744dadfb
2 changed files with 141 additions and 64 deletions

View File

@@ -1791,7 +1791,7 @@ export class ActiveDoc extends EventEmitter {
if (options?.bestEffort) {
actions = await this._granularAccess.prefilterUserActions(docSession, actions);
}
await this._granularAccess.assertCanMaybeApplyUserActions(docSession, actions);
await this._granularAccess.checkUserActions(docSession, actions);
// Create the UserActionBundle.
const action: UserActionBundle = {