Allow negations with the * permission node when population superperms.

This commit is contained in:
ElgarL 2012-01-24 19:38:22 +00:00
parent a13740f638
commit 8390594682
2 changed files with 9 additions and 6 deletions

View File

@ -116,4 +116,5 @@ v 1.9:
- Fixed fetching world data so it no longer returns the mirrored world for groups. Each world data holder now points to the correct data set, so can be returned as an object.
- Changed addSubGroup() to only add the group if it doesn't already exist (no need to update an already existing group).
- addSubGroup now returns a boolean for success/failure.
- '/manuaddsub' now correctly reports if it was able to add the sub group.
- '/manuaddsub' now correctly reports if it was able to add the sub group.
- Allow negations with the * permission node when population superperms.

View File

@ -150,12 +150,14 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
Set<String> permArray = new HashSet<String>();
// Allow * node to populate ALL perms in Bukkit.
if (perms.contains("*")) {
permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren));
perms.remove("*");
}
for (String perm : perms) {
// Allow * node to populate ALL perms in Bukkit.
if (perm.equalsIgnoreCase("*"))
permArray.addAll(GroupManager.BukkitPermissions.getAllRegisteredPermissions(includeChildren));
boolean negated = false;
if (perm.startsWith("-"))
negated = true;