mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Implement much of the general AccessRules UI.
Summary: - Factored out ACLRuleCollection into its own file, and use for building UI. - Moved AccessRules out of UserManager to a page linked from left panel. - Changed default RulePart to be the last part of a rule for simpler code. - Implemented much of the UI for adding/deleting rules. - For now, editing the ACLFormula and Permissions is done using text inputs. - Implemented saving rules by syncing a bundle of them. - Fixed DocData to clean up action bundle in case of an early error. Test Plan: WIP planning to add some new browser tests for the UI Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2678
This commit is contained in:
@@ -96,14 +96,14 @@ export class DocData extends BaseDocData {
|
||||
this._triggerBundleFinalize?.();
|
||||
await this._lastBundlePromise;
|
||||
}
|
||||
this._nextDesc = options.description;
|
||||
this._lastActionNum = null;
|
||||
this._triggerBundleFinalize = triggerFinalize;
|
||||
const value = await options.prepare();
|
||||
prepareResolve(value);
|
||||
this._shouldIncludeInBundle = options.shouldIncludeInBundle;
|
||||
|
||||
try {
|
||||
this._nextDesc = options.description;
|
||||
this._lastActionNum = null;
|
||||
this._triggerBundleFinalize = triggerFinalize;
|
||||
const value = await options.prepare();
|
||||
prepareResolve(value);
|
||||
this._shouldIncludeInBundle = options.shouldIncludeInBundle;
|
||||
|
||||
await triggerFinalizePromise;
|
||||
// Unset _shouldIncludeInBundle so that actions sent by finalize() are included in the
|
||||
// bundle. If they were checked and incorrectly failed the check, we'd have a deadlock.
|
||||
|
||||
@@ -86,8 +86,6 @@ function _getLoginLogoutUrl(method: 'login'|'logout'|'signin', nextUrl: string):
|
||||
return startUrl.href;
|
||||
}
|
||||
|
||||
export type IDocPage = number | 'new' | 'code';
|
||||
|
||||
/**
|
||||
* Implements the interface expected by UrlState. It is only exported for the sake of tests; the
|
||||
* only public interface is the urlState() accessor.
|
||||
|
||||
Reference in New Issue
Block a user