Access check updated

This commit is contained in:
Svenja Reissaus
2018-09-03 12:11:03 -03:00
parent c2292d99fc
commit 6eccfa84f1
3 changed files with 14 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ public abstract class FCommand extends MCommand<P> {
if (this.actionPermission == null || this.fme == null) return false;
if (!this.fme.isAdminBypassing()) {
Access access = myFaction.getAccess(this.fme, this.actionPermission);
if (access != Access.ALLOW && this.fme.getRole() != Role.ADMIN) {
if (access == Access.DENY) {
return false;
}
}
@@ -60,7 +60,7 @@ public abstract class FCommand extends MCommand<P> {
if (this.actionPermission == null || this.fme == null) return false;
if (!this.fme.isAdminBypassing() && checkifAdmin) {
Access access = myFaction.getAccess(this.fme, this.actionPermission);
if (access != Access.ALLOW && this.fme.getRole() != Role.ADMIN) {
if (access == Access.DENY) {
return false;
}
}
@@ -70,7 +70,7 @@ public abstract class FCommand extends MCommand<P> {
if (this.permission == null || this.fme == null) return false;
if (!this.fme.isAdminBypassing()) {
Access access = myFaction.getAccess(this.fme, perm);
if (access != Access.ALLOW && this.fme.getRole() != Role.ADMIN) {
if (access == Access.DENY) {
return false;
}
}
@@ -80,7 +80,7 @@ public abstract class FCommand extends MCommand<P> {
if (this.permission == null || this.fme == null) return false;
if (!this.fme.isAdminBypassing() && checkifAdmin) {
Access access = myFaction.getAccess(this.fme, perm);
if (access != Access.ALLOW && this.fme.getRole() != Role.ADMIN) {
if (access == Access.DENY) {
return false;
}
}