From 86a380758efff6532b4b9bf5429b6fc195821438 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 26 Apr 2024 12:49:35 +0200 Subject: [PATCH] fox noCasesDefined condition --- .../java/net/hostsharing/hsadminng/rbac/rbacdef/RbacView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacView.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacView.java index efa9d43a..3914db45 100644 --- a/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacView.java +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacdef/RbacView.java @@ -604,7 +604,7 @@ public class RbacView { } boolean matchesCase(final ColumnValue requestedCase) { - final var noCasesDefined = forCases == null || forCases.isEmpty(); + final var noCasesDefined = forCases == null; final var generateForAllCases = requestedCase == null; final boolean isGrantedForRequestedCase = forCases == null || forCases.stream().anyMatch(c -> c.isCase(requestedCase)); return noCasesDefined || generateForAllCases || isGrantedForRequestedCase;