From 04acc21eea2f1afc71149906856d575349bf0336 Mon Sep 17 00:00:00 2001
From: Justin Richer <jricher@mit.edu>
Date: Thu, 26 Jun 2014 13:00:36 -0400
Subject: [PATCH] removed injection of admin email address from client API,
 will happen browser-side now

---
 .../mitre/openid/connect/web/ClientAPI.java    | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java
index 6116cb785..5c2d467d3 100644
--- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java
+++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java
@@ -198,15 +198,6 @@ public class ClientAPI {
 			
 		}
 
-		// set owners as current logged in user if owners aren't set otherwise
-		// try to look up a user based on the principal's name
-		if (client.getContacts() == null || client.getContacts().isEmpty()) {
-			UserInfo user = userInfoService.getByUsername(auth.getName());
-			if (user != null && user.getEmail() != null) {
-				client.setContacts(Sets.newHashSet(user.getEmail()));
-			}
-		}
-
 		client.setDynamicallyRegistered(false);
 
 		ClientDetailsEntity newClient = clientService.saveNewClient(client);
@@ -302,15 +293,6 @@ public class ClientAPI {
 			
 		}
 
-		// set owners as current logged in user if owners aren't set otherwise
-		// try to look up a user based on the principal's name
-		if (client.getContacts() == null || client.getContacts().isEmpty()) {
-			UserInfo user = userInfoService.getByUsername(auth.getName());
-			if (user != null && user.getEmail() != null) {
-				client.setContacts(Sets.newHashSet(user.getEmail()));
-			}
-		}
-
 		ClientDetailsEntity newClient = clientService.updateClient(oldClient, client);
 		m.addAttribute("entity", newClient);