More lenient filter to add a new entry to per-site permissions.
This commit is contained in:
parent
04fad994f4
commit
09a6593011
|
@ -163,7 +163,10 @@
|
|||
let newSiteForm = document.querySelector("#form-newsite");
|
||||
let newSiteInput = newSiteForm.newsite;
|
||||
let button = newSiteForm.querySelector("button");
|
||||
let canAdd = s => policy.get(s).siteMatch === null;
|
||||
let canAdd = s => {
|
||||
let match = policy.get(s).siteMatch;
|
||||
return match === null || s.length > match.length;
|
||||
}
|
||||
|
||||
let validate = () => {
|
||||
let site = newSiteInput.value.trim();
|
||||
|
|
Loading…
Reference in New Issue