minor fix
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@129807 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
40b6bb2ad9
commit
cd7ea087bf
|
@ -293,15 +293,12 @@ public class UserUtil {
|
|||
try{
|
||||
String username = session.getUsername();
|
||||
logger.debug("User in session is " + username);
|
||||
if(session.getAttribute(ckanLicensesKey) != null){
|
||||
logger.debug("List of licenses was into session");
|
||||
}
|
||||
else{
|
||||
|
||||
List<String> titlesLicenses = ckanUtils.getLicenseTitles();
|
||||
LicensesBean licensesBean = new LicensesBean(titlesLicenses);
|
||||
session.setAttribute(ckanLicensesKey, licensesBean);
|
||||
logger.info("List of licenses has been saved into session" + licensesBean);
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e){
|
||||
logger.error("Failed to preload licenses list", e);
|
||||
|
@ -323,10 +320,6 @@ public class UserUtil {
|
|||
logger.debug("Request for user " + username + " organizations list");
|
||||
List<String> orgsName = new ArrayList<String>();
|
||||
|
||||
if(session.getAttribute(ckanOrganizationsPublishKey) != null){
|
||||
logger.debug("List of organizations was into session");
|
||||
}
|
||||
else{
|
||||
if(ckanUtils.isSysAdmin(username, token)){
|
||||
|
||||
logger.info("The user " + username + " is a sysadmin. He can publish everywhere");
|
||||
|
@ -353,7 +346,6 @@ public class UserUtil {
|
|||
}
|
||||
session.setAttribute(ckanOrganizationsPublishKey, orgsName);
|
||||
logger.info("Organizations name for user " + username + " has been saved into session");
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.error("Failed to preload list of organizations in which the user can publish", e);
|
||||
}
|
||||
|
@ -374,11 +366,6 @@ public class UserUtil {
|
|||
String username = session.getUsername();
|
||||
logger.debug("User in session is " + username);
|
||||
|
||||
if(session.getAttribute(ckanProfilesKey) != null){
|
||||
logger.info("List of profiles was into session");
|
||||
}
|
||||
else{
|
||||
|
||||
List<MetaDataProfileBean> beans = new ArrayList<MetaDataProfileBean>();
|
||||
|
||||
try {
|
||||
|
@ -430,7 +417,6 @@ public class UserUtil {
|
|||
logger.error("Error while retrieving metadata beans ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e){
|
||||
logger.error("Failed to retrieve the list of product profiles", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue