From efa3686a13ac328c9e827447c75bd295c99b4e3b Mon Sep 17 00:00:00 2001 From: Michael Simon <simon@kit.edu> Date: Wed, 28 Oct 2015 06:59:12 +0100 Subject: [PATCH] dont process groups for attribute source if group_key is not set --- .../scc/webreg/as/AbstractAttributeSourceWorkflow.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bwreg-service/src/main/java/edu/kit/scc/webreg/as/AbstractAttributeSourceWorkflow.java b/bwreg-service/src/main/java/edu/kit/scc/webreg/as/AbstractAttributeSourceWorkflow.java index dbc8288b6..bfef0eaf7 100644 --- a/bwreg-service/src/main/java/edu/kit/scc/webreg/as/AbstractAttributeSourceWorkflow.java +++ b/bwreg-service/src/main/java/edu/kit/scc/webreg/as/AbstractAttributeSourceWorkflow.java @@ -71,7 +71,7 @@ public abstract class AbstractAttributeSourceWorkflow implements AttributeSource if (prop.readPropOrNull("group_key") != null) groupKey = prop.readPropOrNull("group_key"); else - groupKey = "group"; + groupKey = null; if (prop.readPropOrNull("group_separator") != null) groupSeparator = prop.readPropOrNull("group_separator"); @@ -138,7 +138,7 @@ public abstract class AbstractAttributeSourceWorkflow implements AttributeSource auditor.logAction("as-workflow", "CREATE VALUE (String)", key, "", AuditStatus.SUCCESS); asValue = (ASUserAttrValueStringEntity) asValueDao.persist(asValue); - if (key.equals(groupKey)) { + if (groupKey != null && key.equals(groupKey)) { processGroups(asValue); } } @@ -156,7 +156,7 @@ public abstract class AbstractAttributeSourceWorkflow implements AttributeSource auditor.logAction("as-workflow", "DELETE VALUE", key, "", AuditStatus.SUCCESS); asValueDao.delete(asValue); - if (key.equals(groupKey)) { + if (groupKey != null && key.equals(groupKey)) { processGroups(null); } @@ -179,7 +179,7 @@ public abstract class AbstractAttributeSourceWorkflow implements AttributeSource changed = true; } - if (key.equals(groupKey)) { + if (groupKey != null && key.equals(groupKey)) { changed |= processGroups(asStringValue); } } -- GitLab