Skip to content

Commit 822e031

Browse files
committed
deploy: 5e376e3
1 parent 731e410 commit 822e031

File tree

13 files changed

+242
-219
lines changed

13 files changed

+242
-219
lines changed

classes/IdentitiesUpsertService.html

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ <h3 id="methods">
505505

506506
<tr>
507507
<td class="col-md-4">
508-
<div class="io-line">Defined in <a href="" data-line="118"
509-
class="link-to-prism">src/management/identities/identities-upsert.service.ts:118</a></div>
508+
<div class="io-line">Defined in <a href="" data-line="121"
509+
class="link-to-prism">src/management/identities/identities-upsert.service.ts:121</a></div>
510510
</td>
511511
</tr>
512512

@@ -2605,14 +2605,8 @@ <h3 id="methods">
26052605
this.logger.log(&#x60;${logPrefix} Starting additionalFields transformation.&#x60;);
26062606
await this._validation.transform(data.additionalFields);
26072607
this.logger.log(&#x60;${logPrefix} Starting additionalFields validation.&#x60;);
2608-
let validations &#x3D; await this._validation.validate(data.additionalFields);
2609-
//validation email and uid
2610-
if (await this.checkMail(data) &#x3D;&#x3D;&#x3D; false){
2611-
validations[&#x27;inetOrgPerson.mail&#x27;]&#x3D;&quot;Email déjà présent dans une autre identité&quot;
2612-
}
2613-
if (await this.checkUid(data) &#x3D;&#x3D;&#x3D; false){
2614-
validations[&#x27;inetOrgPerson.uid&#x27;]&#x3D;&quot;Uid déjà présent dans une autre identité&quot;
2615-
}
2608+
2609+
let validations &#x3D; await this._validation.validate(data.additionalFields,true);
26162610
this.logger.log(&#x60;${logPrefix} AdditionalFields validation successful.&#x60;);
26172611
this.logger.log(&#x60;Validations : ${JSON.stringify(validations)}&#x60;);
26182612
crushedUpdate[&#x27;state&#x27;] &#x3D; IdentityState.TO_VALIDATE;
@@ -2622,6 +2616,15 @@ <h3 id="methods">
26222616
crushedUpdate[&#x27;state&#x27;] &#x3D; data.state;
26232617
crushedUpdate[&#x27;additionalFields.validations&#x27;] &#x3D; data.additionalFields.validations;
26242618
}
2619+
//validation email and uid
2620+
if (await this.checkMail(data) &#x3D;&#x3D;&#x3D; false){
2621+
crushedUpdate[&#x27;additionalFields.validations&#x27;][&#x27;inetOrgPerson&#x27;]&#x3D;{mail:&quot;Email déjà présent dans une autre identité&quot;}
2622+
crushedUpdate[&#x27;state&#x27;] &#x3D; data.state;
2623+
}
2624+
if (await this.checkUid(data) &#x3D;&#x3D;&#x3D; false){
2625+
crushedUpdate[&#x27;additionalFields.validations&#x27;][&#x27;inetOrgPerson&#x27;]&#x3D; {uid:&quot;Uid déjà présent dans une autre identité&quot;}
2626+
crushedUpdate[&#x27;state&#x27;] &#x3D; data.state;
2627+
}
26252628

26262629
const fingerprint &#x3D; await this.previewFingerprint(
26272630
construct({

injectables/IdentitiesValidationService.html

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ <h3 id="methods">
970970
<tr>
971971
<td class="col-md-4">
972972
<span class="modifier-icon icon ion-ios-reset"></span>
973-
<code>validate(data: AdditionalFieldsPart | additionalFieldsPartDto)</code>
973+
<code>validate(data: AdditionalFieldsPart | additionalFieldsPartDto, callException: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank">boolean</a>)</code>
974974
</td>
975975
</tr>
976976

@@ -997,6 +997,7 @@ <h3 id="methods">
997997
<td>Name</td>
998998
<td>Type</td>
999999
<td>Optional</td>
1000+
<td>Default value</td>
10001001
<td>Description</td>
10011002
</tr>
10021003
</thead>
@@ -1011,6 +1012,8 @@ <h3 id="methods">
10111012
No
10121013
</td>
10131014

1015+
<td>
1016+
</td>
10141017

10151018
<td>
10161019
<ul>
@@ -1019,6 +1022,23 @@ <h3 id="methods">
10191022

10201023
</td>
10211024
</tr>
1025+
<tr>
1026+
<td>callException</td>
1027+
<td>
1028+
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
1029+
</td>
1030+
1031+
<td>
1032+
No
1033+
</td>
1034+
1035+
<td>
1036+
<code>true</code>
1037+
</td>
1038+
1039+
<td>
1040+
</td>
1041+
</tr>
10221042
</tbody>
10231043
</table>
10241044
</div>
@@ -1467,7 +1487,7 @@ <h3 id="inputs">
14671487
* @param data - The additional fields data to validate.
14681488
* @returns A promise that resolves if validation succeeds, or rejects with validation errors.
14691489
*/
1470-
public async validate(data: AdditionalFieldsPart | additionalFieldsPartDto): Promise&lt;object&gt; {
1490+
public async validate(data: AdditionalFieldsPart | additionalFieldsPartDto,callException:boolean&#x3D;true): Promise&lt;object&gt; {
14711491
if (!data.objectClasses) {
14721492
data.objectClasses &#x3D; [];
14731493
}
@@ -1534,7 +1554,7 @@ <h3 id="inputs">
15341554
}
15351555
}
15361556

1537-
if (reject) {
1557+
if (reject &amp;&amp; callException) {
15381558
throw new ValidationSchemaException({ validations });
15391559
}
15401560
return Promise.resolve({ message: &#x27;Validation succeeded&#x27; });

js/search/search_index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/BackendsModule.html

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -119,93 +119,93 @@
119119
</g>
120120
<g id="clust4" class="cluster">
121121
<title>cluster_BackendsModule_exports</title>
122-
<polygon fill="none" stroke="black" points="290,-208 290,-260 422,-260 422,-208 290,-208"/>
123-
</g>
124-
<g id="clust3" class="cluster">
125-
<title>cluster_BackendsModule_imports</title>
126-
<polygon fill="none" stroke="black" points="196,-78 196,-130 653,-130 653,-78 196,-78"/>
122+
<polygon fill="none" stroke="black" points="226,-208 226,-260 358,-260 358,-208 226,-208"/>
127123
</g>
128124
<g id="clust6" class="cluster">
129125
<title>cluster_BackendsModule_providers</title>
130-
<polygon fill="none" stroke="black" points="16,-78 16,-130 188,-130 188,-78 16,-78"/>
126+
<polygon fill="none" stroke="black" points="481,-78 481,-130 653,-130 653,-78 481,-78"/>
127+
</g>
128+
<g id="clust3" class="cluster">
129+
<title>cluster_BackendsModule_imports</title>
130+
<polygon fill="none" stroke="black" points="16,-78 16,-130 473,-130 473,-78 16,-78"/>
131131
</g>
132132
<!-- AgentsModule -->
133133
<g id="node1" class="node">
134134
<title>AgentsModule</title>
135-
<polygon fill="#8dd3c7" stroke="black" points="644.71,-122 641.71,-126 620.71,-126 617.71,-122 545.29,-122 545.29,-86 644.71,-86 644.71,-122"/>
136-
<text text-anchor="middle" x="595" y="-99.8" font-family="Times,serif" font-size="14.00">AgentsModule</text>
135+
<polygon fill="#8dd3c7" stroke="black" points="464.71,-122 461.71,-126 440.71,-126 437.71,-122 365.29,-122 365.29,-86 464.71,-86 464.71,-122"/>
136+
<text text-anchor="middle" x="415" y="-99.8" font-family="Times,serif" font-size="14.00">AgentsModule</text>
137137
</g>
138138
<!-- BackendsModule -->
139139
<g id="node5" class="node">
140140
<title>BackendsModule</title>
141-
<polygon fill="#8dd3c7" stroke="black" points="412.97,-187 409.97,-191 388.97,-191 385.97,-187 299.03,-187 299.03,-151 412.97,-151 412.97,-187"/>
142-
<text text-anchor="middle" x="356" y="-164.8" font-family="Times,serif" font-size="14.00">BackendsModule</text>
141+
<polygon fill="#8dd3c7" stroke="black" points="348.97,-187 345.97,-191 324.97,-191 321.97,-187 235.03,-187 235.03,-151 348.97,-151 348.97,-187"/>
142+
<text text-anchor="middle" x="292" y="-164.8" font-family="Times,serif" font-size="14.00">BackendsModule</text>
143143
</g>
144144
<!-- AgentsModule&#45;&gt;BackendsModule -->
145145
<g id="edge1" class="edge">
146146
<title>AgentsModule&#45;&gt;BackendsModule</title>
147-
<path fill="none" stroke="black" d="M595,-122.11C595,-141.34 595,-169 595,-169 595,-169 423.25,-169 423.25,-169"/>
148-
<polygon fill="black" stroke="black" points="423.25,-165.5 413.25,-169 423.25,-172.5 423.25,-165.5"/>
147+
<path fill="none" stroke="black" d="M415,-122.02C415,-139.37 415,-163 415,-163 415,-163 359.18,-163 359.18,-163"/>
148+
<polygon fill="black" stroke="black" points="359.18,-159.5 349.18,-163 359.18,-166.5 359.18,-159.5"/>
149149
</g>
150150
<!-- IdentitiesModule -->
151151
<g id="node2" class="node">
152152
<title>IdentitiesModule</title>
153-
<polygon fill="#8dd3c7" stroke="black" points="527.65,-122 524.65,-126 503.65,-126 500.65,-122 416.35,-122 416.35,-86 527.65,-86 527.65,-122"/>
154-
<text text-anchor="middle" x="472" y="-99.8" font-family="Times,serif" font-size="14.00">IdentitiesModule</text>
153+
<polygon fill="#8dd3c7" stroke="black" points="347.65,-122 344.65,-126 323.65,-126 320.65,-122 236.35,-122 236.35,-86 347.65,-86 347.65,-122"/>
154+
<text text-anchor="middle" x="292" y="-99.8" font-family="Times,serif" font-size="14.00">IdentitiesModule</text>
155155
</g>
156156
<!-- IdentitiesModule&#45;&gt;BackendsModule -->
157157
<g id="edge2" class="edge">
158158
<title>IdentitiesModule&#45;&gt;BackendsModule</title>
159-
<path fill="none" stroke="black" d="M416.27,-104C409.88,-104 405.6,-104 405.6,-104 405.6,-104 405.6,-140.89 405.6,-140.89"/>
160-
<polygon fill="black" stroke="black" points="402.1,-140.89 405.6,-150.89 409.1,-140.89 402.1,-140.89"/>
159+
<path fill="none" stroke="black" d="M292,-122.11C292,-122.11 292,-140.99 292,-140.99"/>
160+
<polygon fill="black" stroke="black" points="288.5,-140.99 292,-150.99 295.5,-140.99 288.5,-140.99"/>
161161
</g>
162162
<!-- JobsModule -->
163163
<g id="node3" class="node">
164164
<title>JobsModule</title>
165-
<polygon fill="#8dd3c7" stroke="black" points="398.44,-122 395.44,-126 374.44,-126 371.44,-122 313.56,-122 313.56,-86 398.44,-86 398.44,-122"/>
166-
<text text-anchor="middle" x="356" y="-99.8" font-family="Times,serif" font-size="14.00">JobsModule</text>
165+
<polygon fill="#8dd3c7" stroke="black" points="218.44,-122 215.44,-126 194.44,-126 191.44,-122 133.56,-122 133.56,-86 218.44,-86 218.44,-122"/>
166+
<text text-anchor="middle" x="176" y="-99.8" font-family="Times,serif" font-size="14.00">JobsModule</text>
167167
</g>
168168
<!-- JobsModule&#45;&gt;BackendsModule -->
169169
<g id="edge3" class="edge">
170170
<title>JobsModule&#45;&gt;BackendsModule</title>
171-
<path fill="none" stroke="black" d="M356,-122.11C356,-122.11 356,-140.99 356,-140.99"/>
172-
<polygon fill="black" stroke="black" points="352.5,-140.99 356,-150.99 359.5,-140.99 352.5,-140.99"/>
171+
<path fill="none" stroke="black" d="M176,-122.02C176,-139.37 176,-163 176,-163 176,-163 225.02,-163 225.02,-163"/>
172+
<polygon fill="black" stroke="black" points="225.02,-166.5 235.02,-163 225.02,-159.5 225.02,-166.5"/>
173173
</g>
174174
<!-- TasksModule -->
175175
<g id="node4" class="node">
176176
<title>TasksModule</title>
177-
<polygon fill="#8dd3c7" stroke="black" points="296.21,-122 293.21,-126 272.21,-126 269.21,-122 203.79,-122 203.79,-86 296.21,-86 296.21,-122"/>
178-
<text text-anchor="middle" x="250" y="-99.8" font-family="Times,serif" font-size="14.00">TasksModule</text>
177+
<polygon fill="#8dd3c7" stroke="black" points="116.21,-122 113.21,-126 92.21,-126 89.21,-122 23.79,-122 23.79,-86 116.21,-86 116.21,-122"/>
178+
<text text-anchor="middle" x="70" y="-99.8" font-family="Times,serif" font-size="14.00">TasksModule</text>
179179
</g>
180180
<!-- TasksModule&#45;&gt;BackendsModule -->
181181
<g id="edge4" class="edge">
182182
<title>TasksModule&#45;&gt;BackendsModule</title>
183-
<path fill="none" stroke="black" d="M296.31,-104C302.3,-104 306.4,-104 306.4,-104 306.4,-104 306.4,-140.89 306.4,-140.89"/>
184-
<polygon fill="black" stroke="black" points="302.9,-140.89 306.4,-150.89 309.9,-140.89 302.9,-140.89"/>
183+
<path fill="none" stroke="black" d="M70,-122.28C70,-143.32 70,-175 70,-175 70,-175 224.83,-175 224.83,-175"/>
184+
<polygon fill="black" stroke="black" points="224.83,-178.5 234.83,-175 224.83,-171.5 224.83,-178.5"/>
185185
</g>
186186
<!-- BackendsService -->
187187
<g id="node6" class="node">
188188
<title>BackendsService </title>
189-
<polygon fill="#fb8072" stroke="black" points="413.9,-252 298.1,-252 298.1,-216 413.9,-216 413.9,-252"/>
190-
<text text-anchor="middle" x="356" y="-229.8" font-family="Times,serif" font-size="14.00">BackendsService </text>
189+
<polygon fill="#fb8072" stroke="black" points="349.9,-252 234.1,-252 234.1,-216 349.9,-216 349.9,-252"/>
190+
<text text-anchor="middle" x="292" y="-229.8" font-family="Times,serif" font-size="14.00">BackendsService </text>
191191
</g>
192192
<!-- BackendsModule&#45;&gt;BackendsService -->
193193
<g id="edge5" class="edge">
194194
<title>BackendsModule&#45;&gt;BackendsService </title>
195-
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M356,-187.11C356,-187.11 356,-205.99 356,-205.99"/>
196-
<polygon fill="black" stroke="black" points="352.5,-205.99 356,-215.99 359.5,-205.99 352.5,-205.99"/>
195+
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M292,-187.11C292,-187.11 292,-205.99 292,-205.99"/>
196+
<polygon fill="black" stroke="black" points="288.5,-205.99 292,-215.99 295.5,-205.99 288.5,-205.99"/>
197197
</g>
198198
<!-- BackendsService -->
199199
<g id="node7" class="node">
200200
<title>BackendsService</title>
201-
<ellipse fill="#fdb462" stroke="black" cx="102" cy="-104" rx="77.57" ry="18"/>
202-
<text text-anchor="middle" x="102" y="-99.8" font-family="Times,serif" font-size="14.00">BackendsService</text>
201+
<ellipse fill="#fdb462" stroke="black" cx="567" cy="-104" rx="77.57" ry="18"/>
202+
<text text-anchor="middle" x="567" y="-99.8" font-family="Times,serif" font-size="14.00">BackendsService</text>
203203
</g>
204204
<!-- BackendsService&#45;&gt;BackendsModule -->
205205
<g id="edge6" class="edge">
206206
<title>BackendsService&#45;&gt;BackendsModule</title>
207-
<path fill="none" stroke="black" d="M102,-122.11C102,-141.34 102,-169 102,-169 102,-169 289,-169 289,-169"/>
208-
<polygon fill="black" stroke="black" points="289,-172.5 299,-169 289,-165.5 289,-172.5"/>
207+
<path fill="none" stroke="black" d="M567,-122.28C567,-143.32 567,-175 567,-175 567,-175 358.98,-175 358.98,-175"/>
208+
<polygon fill="black" stroke="black" points="358.98,-171.5 348.98,-175 358.98,-178.5 358.98,-171.5"/>
209209
</g>
210210
</g>
211211
</svg>

0 commit comments

Comments
 (0)