[#24458] Published projects cannot be edited/updated

This commit is contained in:
Francesco Mangiacrapa 2023-01-19 14:51:42 +01:00
parent 8dc90cbd6e
commit a89dd687cb
4 changed files with 46 additions and 13 deletions

View File

@ -55,6 +55,7 @@
@ -133,6 +134,7 @@
@ -211,6 +213,7 @@
@ -289,6 +292,7 @@
@ -331,6 +335,7 @@
@ -341,9 +346,7 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-data-common-2.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -478,6 +481,7 @@
@ -556,6 +560,7 @@
@ -634,6 +639,7 @@

View File

@ -4,7 +4,7 @@
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).
## [v3.0.1] - 2022-12-21
## [v3.0.1] - 2023-01-19
#### Fixes
@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- [#23913] Integrated with GUI presentation configurations read from IS
- [#23926] Integrated a Post Creation Action in the UCD and manage it
- [#24136] Integrated the temporal dimension on the front-end side
- [#24458] Published projects cannot be edited/updated
## [v2.2.1] - 2022-06-29

View File

@ -15,6 +15,7 @@ import org.gcube.application.geoportalcommon.shared.config.RoleRights;
import org.gcube.application.geoportalcommon.shared.config.RoleRights.OPERATION_TYPE;
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
import org.gcube.application.geoportalcommon.shared.geoportal.WORKFLOW_PHASE;
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.LifecycleInformationDV;
@ -1522,9 +1523,30 @@ public class GeoPortalDataEntryApp implements EntryPoint {
modal3.setCloseVisible(true);
((Element) modal3.getElement().getChildNodes().getItem(1))
.addClassName("modal-body-custom");
boolean isPublishedProject = false;
if(resultDocumentDV.getLifecycleInfo()!=null) {
String phase = resultDocumentDV.getLifecycleInfo().getPhase();
if(phase!=null && phase.compareToIgnoreCase(WORKFLOW_PHASE.PUBLISHED.getLabel())==0) {
Alert alert = new Alert("Published project cannot be edited/updated.");
alert.setType(AlertType.WARNING);
alert.setClose(false);
modal3.add(alert);
isPublishedProject = true;
}
}
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV);
modal3.add(emr);
modal3.show();
if(isPublishedProject) {
emr.noUpdateMode();
}
break;
}
case CREATE_RELATION: {

View File

@ -114,6 +114,10 @@ public class EditModeRecord extends Composite {
}
public void noUpdateMode() {
buttonJSONUpdate.setVisible(false);
}
private void instanceJSONEditor() {
rawUpdatePanel.clear();