File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/management/identities Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,16 @@ export class IdentitiesCrudController extends AbstractController {
7878 body . inetOrgPerson . employeeType = 'LOCAL' ;
7979 }
8080 if ( ! body . inetOrgPerson . cn ) {
81- body . inetOrgPerson . cn = `${ ( body . inetOrgPerson . sn || '' ) . toUpperCase ( ) } ${ body . inetOrgPerson . givenName } ` ;
81+ body . inetOrgPerson . cn = [
82+ body . inetOrgPerson . sn ?. toUpperCase ( ) ,
83+ body . inetOrgPerson . givenName ,
84+ ] . join ( ' ' ) . trim ( ) ;
8285 }
8386 if ( ! body . inetOrgPerson . displayName ) {
84- body . inetOrgPerson . displayName = body . inetOrgPerson . givenName + ' ' + ( body . inetOrgPerson . sn || '' ) . toUpperCase ( ) ;
87+ body . inetOrgPerson . displayName = [
88+ body . inetOrgPerson . givenName ,
89+ body . inetOrgPerson . sn ?. toUpperCase ( ) ,
90+ ] . join ( ' ' ) . trim ( ) ;
8591 }
8692 const data = await this . _service . create < Identities > ( body ) ;
8793 // If the state is TO_COMPLETE, the identity is created but additional fields are missing or invalid
You can’t perform that action at this time.
0 commit comments