mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-23 19:16:37 +01:00
Ensure child permissions are handled as lowercase when resolving (#2761)
This commit is contained in:
parent
e6a5cb06af
commit
16fbf566f3
@ -180,16 +180,18 @@ public final class LuckPermsPermissionMap extends ForwardingMap<String, Permissi
|
||||
continue;
|
||||
}
|
||||
|
||||
if (accumulator.containsKey(e.getKey())) {
|
||||
String key = e.getKey().toLowerCase();
|
||||
|
||||
if (accumulator.containsKey(key)) {
|
||||
continue; // Prevent infinite loops
|
||||
}
|
||||
|
||||
// xor the value using the parent (bukkit logic, not mine)
|
||||
boolean value = e.getValue() ^ invert;
|
||||
accumulator.put(e.getKey().toLowerCase(), value);
|
||||
accumulator.put(key, value);
|
||||
|
||||
// lookup any deeper children & resolve if present
|
||||
Permission perm = this.delegate.get(e.getKey());
|
||||
Permission perm = this.delegate.get(key);
|
||||
if (perm != null) {
|
||||
resolveChildren(accumulator, perm.getChildren(), !value);
|
||||
}
|
||||
|
@ -180,16 +180,18 @@ public final class LuckPermsPermissionMap extends ForwardingMap<String, Permissi
|
||||
continue;
|
||||
}
|
||||
|
||||
if (accumulator.containsKey(e.getKey())) {
|
||||
String key = e.getKey().toLowerCase();
|
||||
|
||||
if (accumulator.containsKey(key)) {
|
||||
continue; // Prevent infinite loops
|
||||
}
|
||||
|
||||
// xor the value using the parent (nukkit logic, not mine)
|
||||
boolean value = e.getValue() ^ invert;
|
||||
accumulator.put(e.getKey().toLowerCase(), value);
|
||||
accumulator.put(key, value);
|
||||
|
||||
// lookup any deeper children & resolve if present
|
||||
Permission perm = this.delegate.get(e.getKey());
|
||||
Permission perm = this.delegate.get(key);
|
||||
if (perm != null) {
|
||||
resolveChildren(accumulator, perm.getChildren(), !value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user