added check in session expired

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129604 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-06-28 18:27:04 +00:00
parent 55331b3067
commit d1c9c4e133
1 changed files with 19 additions and 0 deletions

View File

@ -315,6 +315,15 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
if(isWithinPortal()){
try{
ASLSession aslSession = getASLSession();
String user = aslSession.getUsername();
// check if session expired
if(user.equals(getDevelopmentUser())){
logger.debug("SESSION EXPIRED");
return null;
}
logger.debug("Request dataset metadata bean for folder with id " + folderId
+ " whose owner is " + owner);
// get usermanager (liferay)
@ -455,7 +464,17 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
logger.debug("Request for creating a dataset with these information " + toCreate);
ASLSession aslSession = getASLSession();
String user = aslSession.getUsername();
try{
// check if session expired
if(user.equals(getDevelopmentUser())){
logger.debug("SESSION EXPIRED");
return null;
}
// get the owner
String username = toCreate.getOwnerIdentifier();