From 06886d32331a99a0e623e1e3dd5fa2ea8af243dd Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Sat, 19 Oct 2024 16:33:58 +0200 Subject: [PATCH] [Fix] fixed wrong error log on duplicate user property from group --- .../strolch/privilege/handler/PrivilegeContextBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/strolch-privilege/src/main/java/li/strolch/privilege/handler/PrivilegeContextBuilder.java b/strolch-privilege/src/main/java/li/strolch/privilege/handler/PrivilegeContextBuilder.java index c767514d2..1fd292488 100644 --- a/strolch-privilege/src/main/java/li/strolch/privilege/handler/PrivilegeContextBuilder.java +++ b/strolch-privilege/src/main/java/li/strolch/privilege/handler/PrivilegeContextBuilder.java @@ -107,8 +107,9 @@ private void prepare(User user) { } Map groupProperties = group.getProperties(); for (String key : groupProperties.keySet()) { - String replaced = this.properties.put(key, groupProperties.get(key)); - if (replaced != null) + String value = groupProperties.get(key); + String replaced = this.properties.put(key, value); + if (replaced != null && !replaced.equals(value)) logger.error("Duplicate property {} for user {} from group {}", key, user.getUsername(), groupName); } }