From bd20e69e15ff0ebb0434fb022ccc7eb399f9abf0 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Thu, 05 Jul 2018 15:21:17 +0200
Subject: [PATCH] fix emailalias target mapping from hsscript

---
 hsarback/src/de/hsadmin/remote/EMailAliasRemote.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java b/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
index 06c67d6..42bd442 100644
--- a/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
+++ b/hsarback/src/de/hsadmin/remote/EMailAliasRemote.java
@@ -48,6 +48,19 @@
 				alias.setTarget(target);
 			} 
 		}
+	    if (l instanceof Map<?, ?>) {
+			final StringBuffer tBuff = new StringBuffer();
+			final Map<? ,?> targetObjMap = (Map<?, ?>) l;
+			for (Object targetObj : targetObjMap.values()) {
+				if (targetObj instanceof String) {
+					if (tBuff.length() > 0) {
+						tBuff.append(',');
+					}
+					tBuff.append((String) targetObj);
+				}
+			}
+			alias.setTarget(tBuff.toString());
+	    }
 		if (l instanceof Object[]) {
 			StringBuffer tBuff = new StringBuffer();
 			Object[] targetObjArray = (Object[]) l;

--
Gitblit v1.9.0-SNAPSHOT