public Response deleteUser(long userId) {
HivePrincipal principal = (HivePrincipal) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserVO currentUser = null;
if(principal.getUser() != null){
currentUser = principal.getUser();
<BUG>}else if(principal.getKey() != null){
currentUser = principal.getKey().getUser();</BUG>
}
if(currentUser != null && currentUser.getId().equals(userId)){
logger.debug("Rejected removing current user");

public Response deleteUser(long userId) {
HivePrincipal principal = (HivePrincipal) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserVO currentUser = null;
if(principal.getUser() != null){
currentUser = principal.getUser();
}
if(currentUser != null && currentUser.getId().equals(userId)){
logger.debug("Rejected removing current user");
