From 430c5e4bef7eef1323e6ba48cfef12f9eaf6d158 Mon Sep 17 00:00:00 2001 From: gaetanbrl Date: Tue, 24 Dec 2024 12:02:20 +0100 Subject: [PATCH] ldap, console : new orgUniqueId #4374 #4372 https://github.com/georchestra/georchestra-gateway/issues/159 Add organizationId object Fix olcAttribute type uniqueOrganizationId Console - new form field - uniqueOrganizationId Custom proconnect tag for docker image ldap management - add new uniqueOrganizationId up attribute and add siret c2c info new uniqueOrganizationId field in orgDao --- Makefile | 2 +- .../ws/editorgdetails/EditOrgDetailsFormBean.java | 1 + .../EditOrgDetailsFormController.java | 2 ++ .../webapp/WEB-INF/i18n/application.properties | 1 + .../webapp/WEB-INF/i18n/application_fr.properties | 1 + .../webapp/WEB-INF/views/createAccountForm.jsp | 4 ++++ .../main/webapp/manager/app/assets/lang/en.json | 1 + .../main/webapp/manager/app/assets/lang/fr.json | 1 + .../webapp/manager/app/components/orgs/orgs.es6 | 2 +- .../webapp/manager/app/templates/orgForm.tpl.html | 7 +++++++ .../src/main/java/org/georchestra/ds/orgs/Org.java | 10 ++++++++++ .../main/java/org/georchestra/ds/orgs/OrgExt.java | 1 + .../main/java/org/georchestra/ds/orgs/OrgsDao.java | 2 ++ .../java/org/georchestra/ds/orgs/OrgsDaoImpl.java | 8 ++++++++ ldap/docker-root/georchestra.ldif | 1 + ldap/docker-root/georchestraSchema.ldif | 14 ++++++++++---- 16 files changed, 52 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3876ba4d7e..4438974a32 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Docker related targets GEOSERVER_EXTENSION_PROFILES=wps-download,app-schema,control-flow,csw,inspire,libjpeg-turbo,monitor,pyramid,wps,css,jp2k,authkey,mapstore2,mbstyle,web-resource,sldservice,geopkg-output -BTAG=latest +BTAG=proconnect docker-pull-jetty: docker pull jetty:9-jre11 diff --git a/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormBean.java b/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormBean.java index 4858facfa6..66242452b0 100644 --- a/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormBean.java +++ b/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormBean.java @@ -12,4 +12,5 @@ private String url; private String orgType; private String mail; + private String uniqueOrganizationId; } diff --git a/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormController.java b/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormController.java index af8ceed65d..fb79c3b33a 100644 --- a/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormController.java +++ b/console/src/main/java/org/georchestra/console/ws/editorgdetails/EditOrgDetailsFormController.java @@ -110,6 +110,7 @@ public String edit(Model model, @ModelAttribute EditOrgDetailsFormBean formBean, validation.validateOrgField("url", formBean.getUrl(), resultErrors); validation.validateOrgField("address", formBean.getAddress(), resultErrors); validation.validateOrgField("description", formBean.getDescription(), resultErrors); + validation.validateOrgField("uniqueOrganizationId", formBean.getUniqueOrganizationId(), resultErrors); // TODO validate mail address for the organization ? if (resultErrors.hasErrors()) { @@ -122,6 +123,7 @@ public String edit(Model model, @ModelAttribute EditOrgDetailsFormBean formBean, orgOrigin.setDescription(formBean.getDescription()); orgOrigin.setUrl(formBean.getUrl()); orgOrigin.setAddress(formBean.getAddress()); + orgOrigin.setUniqueOrganizationId(formBean.getUniqueOrganizationId()); if (!logo.isEmpty()) { orgOrigin.setLogo(transformLogoFileToBase64(logo)); diff --git a/console/src/main/webapp/WEB-INF/i18n/application.properties b/console/src/main/webapp/WEB-INF/i18n/application.properties index bdbaead441..13c50ad487 100644 --- a/console/src/main/webapp/WEB-INF/i18n/application.properties +++ b/console/src/main/webapp/WEB-INF/i18n/application.properties @@ -119,6 +119,7 @@ org.creation.orgDescription=Description org.creation.orgUrl=Url org.creation.orgMail=Mail org.creation.orgLogo=Logo +org.creation.orgUniqueId=Identification number org.shortNameFormat=Short name must only contain alphanumeric characters password.label=Password password.placeholder=Password diff --git a/console/src/main/webapp/WEB-INF/i18n/application_fr.properties b/console/src/main/webapp/WEB-INF/i18n/application_fr.properties index fde13ef0ec..29d629867b 100644 --- a/console/src/main/webapp/WEB-INF/i18n/application_fr.properties +++ b/console/src/main/webapp/WEB-INF/i18n/application_fr.properties @@ -117,6 +117,7 @@ org.creation.orgDescription=Description org.creation.orgUrl=Url org.creation.orgMail=Mail org.creation.orgLogo=Logo +org.creation.orgUniqueId=Numéro d'identification org.shortNameFormat=Le nom court ne doit comporter que des caractères alphanumériques password.label=Mot de passe password.placeholder=Mot de passe diff --git a/console/src/main/webapp/WEB-INF/views/createAccountForm.jsp b/console/src/main/webapp/WEB-INF/views/createAccountForm.jsp index c5230397ae..5bcef3b51d 100644 --- a/console/src/main/webapp/WEB-INF/views/createAccountForm.jsp +++ b/console/src/main/webapp/WEB-INF/views/createAccountForm.jsp @@ -132,6 +132,10 @@ + + + +