This commit is contained in:
Aotumuri
2025-06-02 20:51:08 +09:00
parent 181e5c4900
commit c78ff36dcb
3 changed files with 5 additions and 12 deletions
+3 -6
View File
@@ -9,16 +9,13 @@
},
"pattern": {
"stripes_v": {
"pattern": "ATMYVVU=",
"role_group": ["all"]
"pattern": "ATMYVVU="
},
"stripes_h": {
"pattern": "ATMYDw8=",
"role_group": ["all"]
"pattern": "ATMYDw8="
},
"checkerboard": {
"pattern": "ATMYpaU=",
"role_group": ["all"]
"pattern": "ATMYpaU="
},
"diagonal": {
"pattern": "AZFIAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIA=",
-4
View File
@@ -83,10 +83,6 @@ export class TerritoryPatternsModal extends LitElement {
const groupList = Array.isArray(roleGroup) ? roleGroup : [roleGroup];
if (groupList.includes("all")) {
continue; // Allow all users
}
const isAllowed = groupList.some((required) => roles.includes(required));
if (!isAllowed) {
+2 -2
View File
@@ -33,9 +33,9 @@ export class PrivilegeChecker {
}
const [, entry] = found;
const allowedGroups = entry.role_group;
const allowedGroups = entry.role_group ?? [];
if (allowedGroups.includes("all")) {
if (allowedGroups.length === 0) {
return true;
}