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:
parent
55331b3067
commit
d1c9c4e133
|
@ -315,6 +315,15 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
if(isWithinPortal()){
|
if(isWithinPortal()){
|
||||||
try{
|
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
|
logger.debug("Request dataset metadata bean for folder with id " + folderId
|
||||||
+ " whose owner is " + owner);
|
+ " whose owner is " + owner);
|
||||||
// get usermanager (liferay)
|
// 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);
|
logger.debug("Request for creating a dataset with these information " + toCreate);
|
||||||
|
|
||||||
|
ASLSession aslSession = getASLSession();
|
||||||
|
String user = aslSession.getUsername();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
|
// check if session expired
|
||||||
|
if(user.equals(getDevelopmentUser())){
|
||||||
|
logger.debug("SESSION EXPIRED");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// get the owner
|
// get the owner
|
||||||
String username = toCreate.getOwnerIdentifier();
|
String username = toCreate.getOwnerIdentifier();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue