From 92665b4dd68b2cd46aa924bfc9ca268abcf6b36c Mon Sep 17 00:00:00 2001
From: nab <nabila.aazibou-el-gerrab@kereval.com>
Date: Tue, 22 Oct 2024 16:08:38 +0200
Subject: [PATCH 1/8] Remove old message list from test Instance

---
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../tm.properties                             |  1 -
 .../src/main/messages/tm.properties           |  1 -
 .../administration/preferencesSectionTM.xhtml | 21 -------------------
 .../testing/test/test/TestInstance.xhtml      |  8 +------
 14 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/gazelle-tm-war/src/main/crowdin/de/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/de/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/de/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/de/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/en/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/en/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index d41761cfe..19a7dccd5 100644
--- a/gazelle-tm-war/src/main/crowdin/en/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/en/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/es-ES/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/es-ES/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/es-ES/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/es-ES/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/fi/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/fi/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/fi/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/fi/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/fr/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/fr/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 2350ac151..fd18cda2c 100644
--- a/gazelle-tm-war/src/main/crowdin/fr/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/fr/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accepter toutes syst\u00E8mes list\u00
 net.ihe.gazelle.tm.AcceptancePending=Acceptation en attente
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Les types de fichiers accept\u00E9s sont \: pdf, doc, rtf, odt, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Acc\u00E9der aux messages dans Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Acc\u00E9der aux messages dans Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Acc\u00E9der \u00E0 la liste des tests et aux logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/it/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/it/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 790e67ca4..83f71dae2 100644
--- a/gazelle-tm-war/src/main/crowdin/it/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/it/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/ja/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/ja/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index be9991299..dd908b8b4 100644
--- a/gazelle-tm-war/src/main/crowdin/ja/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/ja/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=\u3059\u3079\u3066\u306E\u30B7\u30B9\u
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=SUT\u304B\u3089\u53D7\u4FE1\u3057\u305FAck
 net.ihe.gazelle.tm.Action=\u30A2\u30AF\u30B7\u30E7\u30F3
diff --git a/gazelle-tm-war/src/main/crowdin/pl/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/pl/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/pl/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/pl/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/sv-SE/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/sv-SE/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/sv-SE/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/sv-SE/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/zh-CN/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/zh-CN/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index f3261697a..ebfde6fb7 100644
--- a/gazelle-tm-war/src/main/crowdin/zh-CN/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/zh-CN/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/crowdin/zh-TW/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties b/gazelle-tm-war/src/main/crowdin/zh-TW/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
index 244d4a709..b2aedfff4 100644
--- a/gazelle-tm-war/src/main/crowdin/zh-TW/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
+++ b/gazelle-tm-war/src/main/crowdin/zh-TW/net.ihe.gazelle.tm.gazelle-tm-war/tm.properties
@@ -1847,7 +1847,6 @@ net.ihe.gazelle.tm.AcceptAllListedSystems=Accept all listed systems
 net.ihe.gazelle.tm.AcceptancePending=Acceptance pending
 net.ihe.gazelle.tm.AcceptedFileTypesArePdfDocOdtRtfDocx=Accepted file types are\: pdf, doc, odt, rtf, docx.
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessTestListAndLogs=Access test list and logs
 net.ihe.gazelle.tm.AcknowledgementReceivedFromSUT=Acknowledgement received from SUT
 net.ihe.gazelle.tm.Action=Action
diff --git a/gazelle-tm-war/src/main/messages/tm.properties b/gazelle-tm-war/src/main/messages/tm.properties
index aefd97eeb..c26093c18 100644
--- a/gazelle-tm-war/src/main/messages/tm.properties
+++ b/gazelle-tm-war/src/main/messages/tm.properties
@@ -3355,7 +3355,6 @@ net.ihe.gazelle.tm.Capturing=Capturing...
 net.ihe.gazelle.tm.RestartCapture=Restart capture
 net.ihe.gazelle.tm.StartCapture=Start capture
 net.ihe.gazelle.tm.ExtendCapture=Extend capture
-net.ihe.gazelle.tm.AccessMessagesInProxyBeta=Access messages in Proxy beta
 net.ihe.gazelle.tm.AccessMessagesInProxy=Access messages in Proxy
 net.ihe.gazelle.tm.CaptureAgain=Capture again
 net.ihe.gazelle.tm.MessageHasBeenCapturedBetween=Message has been captured between
diff --git a/gazelle-tm-war/src/main/webapp/administration/preferencesSectionTM.xhtml b/gazelle-tm-war/src/main/webapp/administration/preferencesSectionTM.xhtml
index b17ea8d34..76df103d8 100755
--- a/gazelle-tm-war/src/main/webapp/administration/preferencesSectionTM.xhtml
+++ b/gazelle-tm-war/src/main/webapp/administration/preferencesSectionTM.xhtml
@@ -159,27 +159,6 @@
                              value="#{preferencesModifier.values['gazelle_proxy_url']}" styleClass=" form-control"
                              required="false">
                 </h:inputText>
-
-            </s:decorate>
-            <s:decorate id="tfProxyMessageDecoration" template="/layout/form/_form_field_horizontal_inline.xhtml">
-                <ui:param name="id" value="proxyMessageInput"/>
-                <ui:define name="label">#{messages['gazelle.tm.application.preferences.ProxyMessage']}</ui:define>
-
-                <h:inputText size="100" id="proxyMessageInput"
-                             value="#{preferencesModifier.values['gazelle_proxy_message']}" styleClass=" form-control"
-                             required="false">
-                </h:inputText>
-
-            </s:decorate>
-            <s:decorate id="tfProxyStepDecoration" template="/layout/form/_form_field_horizontal_inline.xhtml">
-                <ui:param name="id" value="proxyStepInput"/>
-                <ui:define name="label">#{messages['gazelle.tm.application.preferences.ProxyStep']}</ui:define>
-
-                <h:inputText size="100" id="proxyStepInput"
-                             value="#{preferencesModifier.values['gazelle_proxy_step']}" styleClass=" form-control"
-                             required="false">
-                </h:inputText>
-
             </s:decorate>
             <s:decorate id="tfProxyWebserviceEndpointDecoration"
                         template="/layout/form/_form_field_horizontal_inline.xhtml">
diff --git a/gazelle-tm-war/src/main/webapp/testing/test/test/TestInstance.xhtml b/gazelle-tm-war/src/main/webapp/testing/test/test/TestInstance.xhtml
index 991f62f5e..475941ce1 100644
--- a/gazelle-tm-war/src/main/webapp/testing/test/test/TestInstance.xhtml
+++ b/gazelle-tm-war/src/main/webapp/testing/test/test/TestInstance.xhtml
@@ -659,16 +659,10 @@
                                                 <div>
                                                     <h:outputLink class="gzl-btn gzl-btn-blue" target="_blank"
                                                                   value="#{testInstanceManager.getDataHouseUrl(currentTestStepsInstance)}">
-                                                        <h:outputText value="#{messages['net.ihe.gazelle.tm.AccessMessagesInProxyBeta']}"/>
+                                                        <h:outputText value="#{messages['net.ihe.gazelle.tm.AccessMessagesInProxy']}"/>
                                                     </h:outputLink>
                                                 </div>
                                             </s:div>
-                                            <div>
-                                                <h:outputLink target="_blank" class="gzl-btn gzl-btn-blue"
-                                                              value="#{testInstanceManager.getProxyLink(currentTestStepsInstance)}">
-                                                    <h:outputText value="#{messages['net.ihe.gazelle.tm.AccessMessagesInProxy']}"/>
-                                                </h:outputLink>
-                                            </div>
                                         </s:div>
 
                                     </g:column>
-- 
GitLab


From a6bc40815a475489eff53057a44fdd05f6a8fc15 Mon Sep 17 00:00:00 2001
From: nab <nabila.aazibou-el-gerrab@kereval.com>
Date: Thu, 24 Oct 2024 14:27:31 +0200
Subject: [PATCH 2/8] update date interval separator from "," to "_"

---
 .../tm/gazelletest/action/DatahouseURIServiceImpl.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/gazelletest/action/DatahouseURIServiceImpl.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/gazelletest/action/DatahouseURIServiceImpl.java
index c35210f2b..171475a14 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/gazelletest/action/DatahouseURIServiceImpl.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/gazelletest/action/DatahouseURIServiceImpl.java
@@ -38,6 +38,7 @@ public class DatahouseURIServiceImpl implements DatahouseURIService {
     private static final String CHANNEL_TYPE = "channel_type";
     private final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
     private static final Logger LOG = LoggerFactory.getLogger(DatahouseURIServiceImpl.class);
+    private static final String DATE_INTERVAL_SEPARATOR = "_";
 
     @In
     DatahouseURIServiceDAO datahouseURIServiceDAO;
@@ -134,7 +135,7 @@ public class DatahouseURIServiceImpl implements DatahouseURIService {
 
     private void setCapturedDateParam(TestStepsInstance testStepsInstance, URIBuilder uriBuilder) throws URISyntaxException {
         String interval = getCaptureInterval(testStepsInstance);
-        if (!",".equals(interval)) {
+        if (!DATE_INTERVAL_SEPARATOR.equals(interval)) {
             String dateParam = "[" + interval + "]";
             uriBuilder.setParameter(CAPTURED_DATE, dateParam).build();
         }
@@ -153,7 +154,7 @@ public class DatahouseURIServiceImpl implements DatahouseURIService {
         if (testStepsInstance.getStartDate() != null) {
             interval += dateFormat.format(testStepsInstance.getStartDate());
         }
-        interval += ",";
+        interval += DATE_INTERVAL_SEPARATOR;
         if (testStepsInstance.getEndDate() != null)
             interval += dateFormat.format(testStepsInstance.getEndDate());
         return interval;
-- 
GitLab


From c9413c6d91aabd0df0b7a2be3b015c6383bbe37a Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Mon, 4 Nov 2024 18:38:45 +0100
Subject: [PATCH 3/8] add sessionClosed condition

---
 .../ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
index 26cc3ffc0..4acb8382c 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
@@ -443,7 +443,7 @@ public class RegistrationBeanGui implements Serializable {
     }
 
     public boolean showAddImportOrNewSUTButton() {
-        return registrationOpen || Identity.instance().hasRole(Role.VENDOR_LATE_REGISTRATION);
+        return registrationOpen || (Identity.instance().hasRole(Role.VENDOR_LATE_REGISTRATION) && !selectedTestingSession.getSessionClosed());
     }
 
     public boolean canDeleteSUT(SystemSummary systemSummary) {
-- 
GitLab


From e1ecac5fc147810a5cb75c445628cd4f6034d4e3 Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Tue, 5 Nov 2024 10:14:10 +0100
Subject: [PATCH 4/8] add condition on close testing session statut

---
 .../ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
index 4acb8382c..191b46a4d 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
@@ -412,7 +412,7 @@ public class RegistrationBeanGui implements Serializable {
     }
 
     public boolean isManageAttendeeButtonDisplayed() {
-        return (isAttendeesRegistrationEnabled() && identity.hasRole(Role.VENDOR_ADMIN));
+        return (isAttendeesRegistrationEnabled() && identity.hasRole(Role.VENDOR_ADMIN) && !selectedTestingSession.isClosed());
     }
 
     public boolean checkContractRole() {
-- 
GitLab


From 5ef2fb8f41ab57e3d720ae062c96adf8972ad990 Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Tue, 5 Nov 2024 10:14:36 +0100
Subject: [PATCH 5/8] add condition on close testing session statut

---
 .../net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
index 421aa2eb8..71a6385bc 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
@@ -312,6 +312,7 @@ public class SystemInSessionEditor extends AbstractSystemInSessionEditor impleme
 
     public boolean isAllowedToEdit(SystemSummary systemSummary) {
         return identity.isLoggedIn()
+                && !systemInSession.getTestingSession().isClosed()
                 && (identity.hasRole(Role.ADMIN)
                 || identity.hasRole(Role.VENDOR)
                 || identity.hasRole(Role.TESTING_SESSION_ADMIN)
-- 
GitLab


From d4a694725d2cd1f85c9700e71ba93b455a19459a Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Tue, 5 Nov 2024 11:30:03 +0100
Subject: [PATCH 6/8] add condition on systemInsession is null

---
 .../tm/systems/action/AbstractSystemInSessionEditor.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/AbstractSystemInSessionEditor.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/AbstractSystemInSessionEditor.java
index b59da4105..efae5425e 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/AbstractSystemInSessionEditor.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/AbstractSystemInSessionEditor.java
@@ -93,7 +93,7 @@ public abstract class AbstractSystemInSessionEditor extends SystemInSessionNavig
    }
 
    public boolean userIsCreator(SystemInSession currentSystemInSession) {
-      String ownerUserName = currentSystemInSession.getSystem().getOwnerUserId();
+      String ownerUserName = currentSystemInSession != null ? currentSystemInSession.getSystem().getOwnerUserId(): "";
       String userName = identity.getUsername();
       return ownerUserName.equals(userName);
    }
-- 
GitLab


From 053cfc31ee61ec518c7017db5c39f2e174d3aa5a Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Tue, 5 Nov 2024 12:53:10 +0100
Subject: [PATCH 7/8] fix NPE

---
 .../net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
index 71a6385bc..421aa2eb8 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/systems/action/SystemInSessionEditor.java
@@ -312,7 +312,6 @@ public class SystemInSessionEditor extends AbstractSystemInSessionEditor impleme
 
     public boolean isAllowedToEdit(SystemSummary systemSummary) {
         return identity.isLoggedIn()
-                && !systemInSession.getTestingSession().isClosed()
                 && (identity.hasRole(Role.ADMIN)
                 || identity.hasRole(Role.VENDOR)
                 || identity.hasRole(Role.TESTING_SESSION_ADMIN)
-- 
GitLab


From 656a7bc5cac03ba1ea25b9739a55e2fc5af0c397 Mon Sep 17 00:00:00 2001
From: Alexandre POCINHO <apo@kereval.com>
Date: Tue, 5 Nov 2024 12:53:54 +0100
Subject: [PATCH 8/8] create method isTestingSessionOpened

---
 .../gazelle/tm/registration/gui/RegistrationBeanGui.java    | 6 ++++--
 .../src/main/webapp/registration/_registration-sut.xhtml    | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
index 191b46a4d..7dc6ff146 100644
--- a/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
+++ b/gazelle-tm-ejb/src/main/java/net/ihe/gazelle/tm/registration/gui/RegistrationBeanGui.java
@@ -412,7 +412,7 @@ public class RegistrationBeanGui implements Serializable {
     }
 
     public boolean isManageAttendeeButtonDisplayed() {
-        return (isAttendeesRegistrationEnabled() && identity.hasRole(Role.VENDOR_ADMIN) && !selectedTestingSession.isClosed());
+        return (isAttendeesRegistrationEnabled() && identity.hasRole(Role.VENDOR_ADMIN) && isTestingSessionOpened());
     }
 
     public boolean checkContractRole() {
@@ -443,13 +443,15 @@ public class RegistrationBeanGui implements Serializable {
     }
 
     public boolean showAddImportOrNewSUTButton() {
-        return registrationOpen || (Identity.instance().hasRole(Role.VENDOR_LATE_REGISTRATION) && !selectedTestingSession.getSessionClosed());
+        return registrationOpen || (Identity.instance().hasRole(Role.VENDOR_LATE_REGISTRATION) && isTestingSessionOpened());
     }
 
     public boolean canDeleteSUT(SystemSummary systemSummary) {
         return registrationOpen && Identity.instance().hasRole(Role.VENDOR_ADMIN) && !systemSummary.isAccepted();
     }
 
+    public boolean isTestingSessionOpened() {return  !selectedTestingSession.getSessionClosed(); };
+
     /////////////////// Links ///////////////////
 
     public String manageSUTsButton() {
diff --git a/gazelle-tm-war/src/main/webapp/registration/_registration-sut.xhtml b/gazelle-tm-war/src/main/webapp/registration/_registration-sut.xhtml
index d9dfd7db9..b7a18894e 100644
--- a/gazelle-tm-war/src/main/webapp/registration/_registration-sut.xhtml
+++ b/gazelle-tm-war/src/main/webapp/registration/_registration-sut.xhtml
@@ -103,7 +103,7 @@
                                     <span class="gzl-icon-search"/>
                                 </a4j:commandLink>
                             </h:panelGroup>
-                            <h:panelGroup rendered="#{systemInSessionEditor.isAllowedToEdit(systemSummary)}">
+                            <h:panelGroup rendered="#{systemInSessionEditor.isAllowedToEdit(systemSummary) and registrationBeanGui.isTestingSessionOpened()}">
                                 <a4j:commandLink id="currentSystemSummary_EditSupport"
                                                  action="#{registrationBeanGui.editSystemInSessionSummaryActionRedirect(systemSummary.getSystemInSession())}"
                                                  immediate="true"
-- 
GitLab