mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
do not allow inherited permissions to negate higher perms.
This commit is contained in:
parent
746eb353a2
commit
7f269187c5
2 changed files with 8 additions and 3 deletions
|
@ -123,3 +123,4 @@ v 1.9:
|
|||
- Check for a null player object in the PlayerTeleportEvent.
|
||||
- Trap errors in fetching the mirrors map.
|
||||
- Fixed an infinite loop error when using '/manudel' on a logged in player. It caused setDefaultGroup to trigger a bukkit update when no GM User existed yet.
|
||||
- do not allow inherited permissions to negate higher perms.
|
|
@ -135,9 +135,13 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||
}
|
||||
|
||||
// Add all group permissions, unless negated by direct player perms.
|
||||
for (String perm : groupPermArray)
|
||||
if ((!playerPermArray.contains(perm)) && (!playerPermArray.contains("-" + perm)))
|
||||
for (String perm : groupPermArray) {
|
||||
// Perm doesn't already exists and there is no negation for it
|
||||
// It's not a negated perm where a normal perm exists (don't allow inheritance to negate higher perms)
|
||||
if ((!playerPermArray.contains(perm)) && (!playerPermArray.contains("-" + perm))
|
||||
&& (!perm.startsWith("-") && (!playerPermArray.contains(perm.substring(1)))))
|
||||
playerPermArray.add(perm);
|
||||
}
|
||||
|
||||
}
|
||||
// Collections.sort(playerPermArray,
|
||||
|
|
Loading…
Reference in a new issue