(core) Support for $ syntax in ACL rules

Summary: Adding support for the "$" syntax in ACL rules.

Test Plan: Updated

Reviewers: georgegevoian, dsagal

Reviewed By: georgegevoian, dsagal

Differential Revision: https://phab.getgrist.com/D3692
This commit is contained in:
Jarosław Sadziński
2022-11-09 15:57:06 +01:00
parent b29ce996b6
commit 101450262c
4 changed files with 51 additions and 1 deletions

View File

@@ -1155,6 +1155,7 @@ class ObsRulePart extends Disposable {
private _completions = Computed.create<string[]>(this, (use) => [
...use(this._ruleSet.accessRules.userAttrChoices).map(opt => opt.value),
...this._ruleSet.getValidColIds().map(colId => `rec.${colId}`),
...this._ruleSet.getValidColIds().map(colId => `$${colId}`),
...this._ruleSet.getValidColIds().map(colId => `newRec.${colId}`),
]);