[#24458] Published projects cannot be edited/updated
This commit is contained in:
parent
8dc90cbd6e
commit
a89dd687cb
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -77,7 +78,8 @@
|
|||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-entry-app-3.0.1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -155,7 +157,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -233,7 +236,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -311,7 +315,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -341,10 +346,8 @@
|
|||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -422,7 +425,8 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -500,7 +504,8 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -578,7 +583,8 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -114,6 +114,10 @@ public class EditModeRecord extends Composite {
|
|||
|
||||
}
|
||||
|
||||
public void noUpdateMode() {
|
||||
buttonJSONUpdate.setVisible(false);
|
||||
}
|
||||
|
||||
private void instanceJSONEditor() {
|
||||
|
||||
rawUpdatePanel.clear();
|
||||
|
|
Loading…
Reference in New Issue