removed injection of admin email address from client API, will happen browser-side now
parent
a8185e5ae2
commit
04acc21eea
|
@ -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);
|
client.setDynamicallyRegistered(false);
|
||||||
|
|
||||||
ClientDetailsEntity newClient = clientService.saveNewClient(client);
|
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);
|
ClientDetailsEntity newClient = clientService.updateClient(oldClient, client);
|
||||||
m.addAttribute("entity", newClient);
|
m.addAttribute("entity", newClient);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue