[BUG] Fix Deny List check order
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
version_major=0
|
version_major=0
|
||||||
version_minor=0
|
version_minor=0
|
||||||
version_patch=37
|
version_patch=39
|
||||||
|
|
||||||
shade_group=com.hypherionmc.sdlink.shaded.
|
shade_group=com.hypherionmc.sdlink.shaded.
|
||||||
|
|
||||||
|
|||||||
@@ -306,10 +306,7 @@ public class MinecraftAccount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!SDLinkConfig.INSTANCE.accessControl.requiredRoles.isEmpty()) {
|
if (!SDLinkConfig.INSTANCE.accessControl.requiredRoles.isEmpty() || ! SDLinkConfig.INSTANCE.accessControl.deniedRoles.isEmpty()) {
|
||||||
if (RoleManager.getVerificationRoles().isEmpty())
|
|
||||||
return Result.error("rolesNotLoaded");
|
|
||||||
|
|
||||||
Profiler profiler = Profiler.getProfiler("checkRequiredRoles");
|
Profiler profiler = Profiler.getProfiler("checkRequiredRoles");
|
||||||
profiler.start("Checking Required Roles");
|
profiler.start("Checking Required Roles");
|
||||||
AtomicBoolean anyFound = new AtomicBoolean(false);
|
AtomicBoolean anyFound = new AtomicBoolean(false);
|
||||||
@@ -330,10 +327,10 @@ public class MinecraftAccount {
|
|||||||
}));
|
}));
|
||||||
profiler.stop();
|
profiler.stop();
|
||||||
|
|
||||||
if (deniedFound.get())
|
if (deniedFound.get() && !RoleManager.getDeniedRoles().isEmpty())
|
||||||
return Result.error("accessDeniedByRole");
|
return Result.error("accessDeniedByRole");
|
||||||
|
|
||||||
if (!anyFound.get())
|
if (!anyFound.get() && !RoleManager.getVerificationRoles().isEmpty())
|
||||||
return Result.error("rolesNotFound");
|
return Result.error("rolesNotFound");
|
||||||
|
|
||||||
if (member.isEmpty())
|
if (member.isEmpty())
|
||||||
|
|||||||
Reference in New Issue
Block a user