From a51c7f9312186d5a5c2adc3514a71f724afe0fcb Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 22 May 2020 15:24:56 +0200 Subject: [PATCH] Social Post is disabled if not explicitly enabled by the client #19295 --- changelog.md | 116 ++++++++++++++++++ changelog.xml | 5 +- pom.xml | 2 +- .../gcat/persistence/ckan/CKANPackage.java | 4 +- 4 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..2dcf09e --- /dev/null +++ b/changelog.md @@ -0,0 +1,116 @@ +# Changelog + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [1-4-3] [r4.23.0] - 2020-05-22 + +### Changed + +- [#19295] Social Post is disabled if not explicitly enabled by the client + +## [v1-4-2] [r4.20.0]- 2020-02-14 + + +### Added + +**Features** + +- Added method to retrieve a persisted file + +### Changed + +**Fixes** + +- Considering that a file could not be persisted because it could be published via portlet + + +## [1-4-1] - 2019-12-20 + +### Changed + +**Fixes** + +- Fixed distro files and pom according to new release procedure + +- Fixed metadata checks + +## [1-4-0] - 2019-11-06 + +### Added + +**Features** + +- [#17635] Items listing API when invoked at VO level allow to get all the catalogue items or filtering them by organization + +- [#17645] Enabled the possibility of filtering the result of items listing API + +### Changed + +**Fixes** + +- [#16360] User information are checked/updated on CKAN using portal information + +## [1-3-0] - 2019-06-12 + +### Changed + +**Fixes** + +- [#16740] Removed the requirement of providing the id of an item in update + +## [1-2-0] - 2019-06-12 + +### Changed + +**Fixes** + +- Separated REST class for Profile management from the logic which effectively manage profile on IS + +- [#16182] Tags are now properly created/added according to profile definition + +- [#16183] Groups are now properly created/added according to profile definition + +- [#16330] Fixed bug on getting responses from social service + +- [#16347] Setting format in resources + +- [#16354] Validated provided LicenseId for Item + +- [#16410] Capacity field is removed from the provided item content if any + +- [#16322] Fixed bug on social post creation + +- [#16322] Added the possibility to disable social post on item creation + +- [#16322] Improved social post message + +- [#16635] Added support to publish in specific organizations when the request is not performed at VRE level + +## [1-1-0] - 2019-02-26 + +### Changed + +**Fixes** + +- [#13309] Added Item URL via URI Resolver in extras field + +- [#13303] The final URL is retrieved only URI resolver pointing to Storage Hub + +- [#13306] Enforched items to be searchable in 'extras' field + +- [#13307] Switched item listing to use package_search in place of package_list + +- [#13076] Refactored to use storage-hub-persistence library + +- [#13079] Added Create/Update/Delete in Profile Collection + +- Fixed issues in Resource collection + +- Refactored to use gcat-api library + + +## [1-0-0] - 2018-12-07 + +First Release diff --git a/changelog.xml b/changelog.xml index 7c1ffe5..b1bf561 100644 --- a/changelog.xml +++ b/changelog.xml @@ -1,7 +1,10 @@ - + + Social Post is disabled if not explitly enabled by the client #19295 + + Considering that a file could not be persisted because it could be published via portlet Added method to retrieve a persisted file diff --git a/pom.xml b/pom.xml index 99c9b4b..e08f8c9 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.data-publishing gcat war - 1.4.2 + 1.4.3-SNAPHOT gCube Catalogue (gCat) Service This service allows any client to publish on the gCube Catalogue. diff --git a/src/main/java/org/gcube/gcat/persistence/ckan/CKANPackage.java b/src/main/java/org/gcube/gcat/persistence/ckan/CKANPackage.java index 973f7a0..3da98c2 100644 --- a/src/main/java/org/gcube/gcat/persistence/ckan/CKANPackage.java +++ b/src/main/java/org/gcube/gcat/persistence/ckan/CKANPackage.java @@ -432,14 +432,14 @@ public class CKANPackage extends CKAN { protected void sendSocialPost(String title, String catalogueItemURL) { try { - boolean socialPost = true; + boolean socialPost = false; try { MultivaluedMap queryParameters = uriInfo.getQueryParameters(); if(queryParameters.containsKey(GCatConstants.SOCIAL_POST_PARAMETER)) { socialPost = Boolean.parseBoolean(queryParameters.getFirst(GCatConstants.SOCIAL_POST_PARAMETER)); } } catch(Exception e) { - socialPost = true; + socialPost = false; } if(socialPost) {