File tree Expand file tree Collapse file tree 4 files changed +61
-16
lines changed
src/management/identities Expand file tree Collapse file tree 4 files changed +61
-16
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " $schema " : http://json-schema.org/draft-07/schema#
3+ type : object
4+ properties :
5+ cn :
6+ type : string
7+ description : Common name of the inetOrgPerson.
8+ sn :
9+ type : string
10+ description : Surname of the inetOrgPerson.
11+ uid :
12+ type : string
13+ description : UID of the inetOrgPerson.
14+ displayName :
15+ type : string
16+ description : Display name of the inetOrgPerson.
17+ facsimileTelephoneNumber :
18+ type : string
19+ description : Facsimile telephone number of the inetOrgPerson.
20+ givenName :
21+ type : string
22+ description : Given name of the inetOrgPerson.
23+ labeledURI :
24+ type : string
25+ description : URI associated with the inetOrgPerson.
26+ mail :
27+ type : string
28+ format : email
29+ description : Email address of the inetOrgPerson.
30+ mobile :
31+ type : string
32+ description : Mobile number of the inetOrgPerson.
33+ postalAddress :
34+ type : string
35+ description : Postal address of the inetOrgPerson.
36+ preferredLanguage :
37+ type : string
38+ description : Preferred language of the inetOrgPerson.
39+ telephoneNumber :
40+ type : string
41+ description : Telephone number of the inetOrgPerson.
42+ title :
43+ type : string
44+ description : Title of the inetOrgPerson.
45+ userCertificate :
46+ type : string
47+ description : User certificate of the inetOrgPerson.
48+ userPassword :
49+ type : string
50+ description : User password of the inetOrgPerson.
51+ required :
52+ - cn
53+ - sn
54+ - uid
Original file line number Diff line number Diff line change @@ -89,6 +89,12 @@ export class IdentitiesController extends AbstractController {
8989 if ( ! body . inetOrgPerson . employeeType ) {
9090 body . inetOrgPerson . employeeType = 'LOCAL' ;
9191 }
92+ if ( ! body . inetOrgPerson . cn ) {
93+ body . inetOrgPerson . cn = body . inetOrgPerson . sn . toUpperCase ( ) + ' ' + body . inetOrgPerson . givenName ;
94+ }
95+ if ( ! body . inetOrgPerson . displayName ) {
96+ body . inetOrgPerson . displayName = body . inetOrgPerson . givenName + ' ' + body . inetOrgPerson . sn . toUpperCase ( ) ;
97+ }
9298 const data = await this . _service . create < Identities > ( body ) ;
9399 // If the state is TO_COMPLETE, the identity is created but additional fields are missing or invalid
94100 // Else the state is TO_VALIDATE, we return a 201 status code
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ elements:
77 label : CN
88 scope : " #/properties/cn"
99 options :
10- required : true
10+ required : false
1111 - type : Control
1212 label : Création Nom
1313 scope : " #/properties/sn"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments