(core) Implement checkbox for SchemaEdit permission in Access Rules UI.

Summary:
- Introduces a fictitious "*SPECIAL:SchemaEdit" resource in UI only.
- Hides "S" bit for the default rule section.
- Shows a checkbox UI similar to other checkboxes, with an additional
  dismissable warning.

Test Plan: Added a browser test

Reviewers: paulfitz, georgegevoian

Reviewed By: paulfitz, georgegevoian

Differential Revision: https://phab.getgrist.com/D3765
This commit is contained in:
Dmitry S
2023-01-18 10:36:11 -05:00
parent 18d016c745
commit 45c7602f49
4 changed files with 257 additions and 46 deletions

View File

@@ -121,10 +121,12 @@ export function startsWith(value: string): RegExp {
}
/**
* Helper to scroll an element into view.
* Helper to scroll an element into view. Returns the passed-in element.
*/
export function scrollIntoView(elem: WebElement): Promise<void> {
return driver.executeScript((el: any) => el.scrollIntoView({behavior: 'auto'}), elem);
export function scrollIntoView(elem: WebElement): WebElementPromise {
return new WebElementPromise(driver,
driver.executeScript((el: any) => el.scrollIntoView({behavior: 'auto'}), elem)
.then(() => elem));
}
/**