Splitter row for debugging
This commit is contained in:
parent
d4201c68c6
commit
84fbf0ea4e
|
@ -10,6 +10,7 @@ import org.gcube.com.fasterxml.jackson.databind.JsonMappingException;
|
|||
import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
||||
import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
|
||||
import org.gcube.common.authorization.utils.user.User;
|
||||
import org.gcube.informationsystem.base.reference.Element;
|
||||
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
||||
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
||||
|
@ -29,13 +30,14 @@ public class MetadataUtility {
|
|||
private static final Logger logger = LoggerFactory.getLogger(MetadataUtility.class);
|
||||
|
||||
public static String getUser() {
|
||||
String user = Metadata.UNKNOWN_USER;
|
||||
String username = Metadata.UNKNOWN_USER;
|
||||
try {
|
||||
user = SecretManagerProvider.instance.get().getUser().getUsername();
|
||||
User user = SecretManagerProvider.instance.get().getUser();
|
||||
username = user.getUsername();
|
||||
} catch(Exception e) {
|
||||
logger.error("Unable to retrieve user. {} will be used", user);
|
||||
logger.error("Unable to retrieve user. {} will be used", username, e);
|
||||
}
|
||||
return user;
|
||||
return username;
|
||||
}
|
||||
|
||||
public static Metadata createMetadata() {
|
||||
|
|
Loading…
Reference in New Issue