Add wisemapping support for import.
This commit is contained in:
@@ -41,6 +41,7 @@ final public class Utils {
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static User getUser() {
|
||||
User result = null;
|
||||
final Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
@@ -51,6 +52,10 @@ final public class Utils {
|
||||
result = ((UserDetails)principal).getUser();
|
||||
}
|
||||
}
|
||||
|
||||
if(result==null){
|
||||
throw new IllegalStateException("User could not be retrieved");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user