Merged from branch version 1.3 of release 4.13

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/catalogue-ws@173918 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-11-02 11:32:50 +00:00
parent cfa207064a
commit fe6c1d3b76
3 changed files with 14 additions and 0 deletions

View File

@ -7,6 +7,8 @@
<Change>Added update support for Item #11516</Change>
<Change>Changed caching mechanism from ehcache API to JSR-107. Ehcache is still used as runtime library.</Change>
<Change>Solved random NullPointer Exception on catalogue-ws related to old caching mechanism #11466</Change>
<Change>Fixed normalization of the organization name #12506</Change>
<Change>Added the possibility to deny social post on catalogue-ws #12514</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.catalogue-ws.1-1-1"
date="2018-01-11">

View File

@ -46,6 +46,13 @@ public class PackageCreatePostActions extends Thread {
try {
DataCatalogue dataCatalogue = CatalogueUtils.getCatalogue();
if(!dataCatalogue.isSocialPostEnabled()){
logger.info("Social Post are disabled in the context {}", ContextUtils.getContext());
return;
}
String apiKey = CatalogueUtils.getApiKey();
dataCatalogue.setSearchableField(packageId, true);

View File

@ -117,8 +117,13 @@ public class Validator {
boolean isVREToken = scopeBean.is(Type.VRE);
String ownerOrg = (String) dataset.get(Constants.OWNER_ORG_KEY);
/*
String organization = isVREToken ? ownerOrgFromScope.toLowerCase().replace(" ", "_").replace("-", "_")
: ownerOrg != null ? ownerOrg.toLowerCase().replace(" ", "_").replace("-", "_") : null;
*/
String organization = isVREToken ? ownerOrgFromScope.toLowerCase().replace(" ", "_")
: ownerOrg != null ? ownerOrg : null;
if(organization != null) {
if(!ContextUtils.isApplication()) {