mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 21:54:19 +00:00
fixed
This commit is contained in:
@@ -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=",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user