Fixing code for new authorization
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@131371 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8c336b505e
commit
629207e097
|
@ -41,6 +41,7 @@ public class HeaderUtility {
|
|||
String creator = org.gcube.informationsystem.model.embedded.Header.UNKNOWN_USER;
|
||||
try {
|
||||
Caller caller = AuthorizationProvider.instance.get();
|
||||
if(caller!=null){
|
||||
ClientInfo clientInfo = caller.getClient();
|
||||
String clientId = clientInfo.getId();
|
||||
if (clientId != null && clientId.compareTo("") != 0) {
|
||||
|
@ -48,6 +49,7 @@ public class HeaderUtility {
|
|||
} else {
|
||||
throw new Exception("Username null or empty");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to retrieve user");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue