Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
953f4cbe
by Tony Chemit at 2022-04-26T14:05:31+02:00
-
b090ae7c
by Tony Chemit at 2022-04-26T14:33:33+02:00
-
9b4f96e9
by Tony Chemit at 2022-04-26T15:55:35+02:00
-
3c94bea0
by Tony Chemit at 2022-04-26T16:26:05+02:00
-
0ea354f2
by Tony Chemit at 2022-04-27T07:11:20+02:00
7 changed files:
- core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ll/logbook/ActivityImpl.hbm.xml
- core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ps/logbook/ActivityImpl.hbm.xml
- model/src/main/models/Observe/persistence/21-data-ps-logbook.model
- model/src/main/models/Observe/persistence/31-data-ll-logbook.model
- pom.xml
- server/configuration/src/test/java/fr/ird/observe/dto/server/ServerModelTest.java
- + server/configuration/src/test/resources/META-INF/configuration/security-2284-3.yml
Changes:
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | <many-to-one name="vesselActivity" class="fr.ird.observe.entities.referential.ll.common.VesselActivityImpl" column="vesselActivity" foreign-key="fk_ll_logbook_activity_vesselactivity" lazy="false" not-null="true" />
|
| 57 | 57 | <many-to-one name="dataQuality" class="fr.ird.observe.entities.referential.common.DataQualityImpl" column="dataQuality" foreign-key="fk_ll_logbook_activity_dataquality" />
|
| 58 | 58 | <many-to-one name="fpaZone" class="fr.ird.observe.entities.referential.common.FpaZoneImpl" column="fpaZone" foreign-key="fk_ll_logbook_activity_fpazone" />
|
| 59 | - <many-to-one name="relatedObservedActivity" class="fr.ird.observe.entities.data.ll.observation.ActivityImpl" column="relatedObservedActivity" cascade="delete" foreign-key="fk_ll_logbook_activity_relatedobservedactivity" />
|
|
| 59 | + <many-to-one name="relatedObservedActivity" class="fr.ird.observe.entities.data.ll.observation.ActivityImpl" column="relatedObservedActivity" foreign-key="fk_ll_logbook_activity_relatedobservedactivity" />
|
|
| 60 | 60 | <many-to-one name="set" class="fr.ird.observe.entities.data.ll.logbook.SetImpl" column="set" cascade="delete-orphan" foreign-key="fk_ll_logbook_activity_set" not-null="false" unique="true" unique-key="uk_ll_logbook_activity_set" />
|
| 61 | 61 | <many-to-one name="sample" class="fr.ird.observe.entities.data.ll.logbook.SampleImpl" column="sample" cascade="delete-orphan" foreign-key="fk_ll_logbook_activity_sample" not-null="false" unique="true" unique-key="uk_ll_logbook_activity_sample" />
|
| 62 | 62 | </class>
|
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | </property>
|
| 75 | 75 | <property name="currentDirection" access="field" type="java.lang.Integer" column="currentDirection"/>
|
| 76 | 76 | <many-to-one name="schoolType" class="fr.ird.observe.entities.referential.ps.common.SchoolTypeImpl" column="schoolType" foreign-key="fk_ps_logbook_activity_schooltype" />
|
| 77 | - <many-to-one name="relatedObservedActivity" class="fr.ird.observe.entities.data.ps.observation.ActivityImpl" column="relatedObservedActivity" cascade="delete" foreign-key="fk_ps_logbook_activity_relatedobservedactivity" />
|
|
| 77 | + <many-to-one name="relatedObservedActivity" class="fr.ird.observe.entities.data.ps.observation.ActivityImpl" column="relatedObservedActivity" foreign-key="fk_ps_logbook_activity_relatedobservedactivity" />
|
|
| 78 | 78 | <list name="catches" lazy="true" cascade="all,delete-orphan" >
|
| 79 | 79 | <key column="activity" foreign-key="fk_ps_logbook_activity_catches" not-null="true" />
|
| 80 | 80 | <list-index column="activity_idx"/>
|
| ... | ... | @@ -20,7 +20,7 @@ totalWeight + {*:1} Float |
| 20 | 20 | currentSpeed + {*:1} Float
|
| 21 | 21 | currentDirection + {*:1} Integer
|
| 22 | 22 | schoolType {*:1} referential.ps.common.SchoolType
|
| 23 | -relatedObservedActivity + {0..1} data.ps.observation.Activity
|
|
| 23 | +relatedObservedActivity {0..1} data.ps.observation.Activity
|
|
| 24 | 24 | catches + {*} data.ps.logbook.Catch
|
| 25 | 25 | floatingObject + {*} data.ps.logbook.FloatingObject
|
| 26 | 26 | observedSystem {*:*} referential.ps.common.ObservedSystem
|
| ... | ... | @@ -14,7 +14,7 @@ currentDirection + {*:1} Integer |
| 14 | 14 | vesselActivity {*:1} referential.ll.common.VesselActivity
|
| 15 | 15 | dataQuality {*:0..1} referential.common.DataQuality
|
| 16 | 16 | fpaZone {*:1} referential.common.FpaZone
|
| 17 | -relatedObservedActivity + {0..1} data.ll.observation.Activity
|
|
| 17 | +relatedObservedActivity {0..1} data.ll.observation.Activity
|
|
| 18 | 18 | set + {0..1} data.ll.logbook.Set
|
| 19 | 19 | sample + {0..1} data.ll.logbook.Sample
|
| 20 | 20 |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | <parent>
|
| 24 | 24 | <groupId>io.ultreia.maven</groupId>
|
| 25 | 25 | <artifactId>pom</artifactId>
|
| 26 | - <version>2022.44</version>
|
|
| 26 | + <version>2022.45</version>
|
|
| 27 | 27 | </parent>
|
| 28 | 28 | <groupId>fr.ird.observe</groupId>
|
| 29 | 29 | <artifactId>ird-observe</artifactId>
|
| ... | ... | @@ -156,6 +156,7 @@ |
| 156 | 156 | <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
|
| 157 | 157 | <buildDate>${maven.build.timestamp}</buildDate>
|
| 158 | 158 | <lib.version.toolkit>6.0.10</lib.version.toolkit>
|
| 159 | + <lib.version.java4all.topia>1.75</lib.version.java4all.topia>
|
|
| 159 | 160 | <lib.version.ognl>3.1.29</lib.version.ognl>
|
| 160 | 161 | <!-- FIXME <lib.version.ognl>3.3.2</lib.version.ognl>-->
|
| 161 | 162 | <lib.version.h2>1.4.196</lib.version.h2>
|
| ... | ... | @@ -73,6 +73,17 @@ public class ServerModelTest { |
| 73 | 73 | } catch (InvalidServerModelException e) {
|
| 74 | 74 | Assert.assertEquals("Should have found this message error", "No default databases defined", e.getMessage());
|
| 75 | 75 | }
|
| 76 | + |
|
| 77 | + securityConfiguration = new ServerResources.ConfigResource2("/META-INF/configuration/security-2284-3.yml");
|
|
| 78 | + |
|
| 79 | + content = String.join("\n", securityConfiguration.readLines());
|
|
| 80 | + model = ServerModelHelper.load(content);
|
|
| 81 | + try {
|
|
| 82 | + ServerModelHelper.validate(model);
|
|
| 83 | + Assert.fail("Should have an error");
|
|
| 84 | + } catch (InvalidServerModelException e) {
|
|
| 85 | + Assert.assertEquals("Should have found this message error", "No default databases defined", e.getMessage());
|
|
| 86 | + }
|
|
| 76 | 87 | }
|
| 77 | 88 | |
| 78 | 89 | @Test
|
| 1 | +roles:
|
|
| 2 | + - &role-admin
|
|
| 3 | + password: a
|
|
| 4 | + - &role-technicien
|
|
| 5 | + password: a
|
|
| 6 | + - &role-referentiel
|
|
| 7 | + password: a
|
|
| 8 | + - &role-test
|
|
| 9 | + password: a
|
|
| 10 | +databases:
|
|
| 11 | + - &db-production
|
|
| 12 | + url: jdbc:postgresql://localhost:5432/obstuna-production
|
|
| 13 | + defaultDatabase: false
|
|
| 14 | + roles:
|
|
| 15 | + - *role-admin
|
|
| 16 | + - *role-technicien
|
|
| 17 | + - *role-referentiel
|
|
| 18 | + - &db-test
|
|
| 19 | + url: jdbc:postgresql://localhost:5432/obstuna-test
|
|
| 20 | + roles:
|
|
| 21 | + - *role-admin
|
|
| 22 | + - *role-technicien
|
|
| 23 | + - *role-referentiel
|
|
| 24 | + - *role-test
|
|
| 25 | +users:
|
|
| 26 | + - login: utilisateur-technicien
|
|
| 27 | + password: a
|
|
| 28 | + permissions:
|
|
| 29 | + - database: *db-production
|
|
| 30 | + role: *role-technicien
|
|
| 31 | + apiAccess: ALL
|
|
| 32 | + validationMode: STRONG
|
|
| 33 | + - database: *db-test
|
|
| 34 | + role: *role-technicien
|
|
| 35 | + apiAccess: PUBLIC
|
|
| 36 | + validationMode: PERMISSIVE
|
|
| 37 | + - login: utilisateur-referentiel
|
|
| 38 | + password: a
|
|
| 39 | + permissions:
|
|
| 40 | + - database: *db-production
|
|
| 41 | + role: *role-referentiel
|
|
| 42 | + apiAccess: CLIENT
|
|
| 43 | + validationMode: NONE |