diff --git a/contrib/openldap/core-fd-conf.schema b/contrib/openldap/core-fd-conf.schema index b135d12910b8d46b62a302b8998acf15e36c8ed6..614a7923a7a708a5f635d0772402942729087bf8 100644 --- a/contrib/openldap/core-fd-conf.schema +++ b/contrib/openldap/core-fd-conf.schema @@ -161,6 +161,12 @@ attributetype ( 1.3.6.1.4.1.38414.8.12.22 NAME 'fdMaxAvatarSize' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) +attributetype ( 1.3.6.1.4.1.38414.8.12.23 NAME 'fdGivenNameRequired' + DESC 'FusionDirectory - Whether givenName field is required on users' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) + # Password attributetype ( 1.3.6.1.4.1.38414.8.13.1 NAME 'fdPasswordDefaultHash' @@ -610,7 +616,7 @@ objectclass ( 1.3.6.1.4.1.38414.8.2.1 NAME 'fusionDirectoryConf' fdGidNumberBase $ fdUserRDN $ fdGroupRDN $ fdIdAllocationMethod $ fdGidNumberPoolMin $ fdUidNumberPoolMin $ fdGidNumberPoolMax $ fdUidNumberPoolMax $ fdAclRoleRDN $ fdCnPattern $ fdRestrictRoleMembers $ - fdSplitPostalAddress $ fdPostalAddressPattern $ fdMaxAvatarSize $ + fdSplitPostalAddress $ fdPostalAddressPattern $ fdMaxAvatarSize $ fdGivenNameRequired $ fdPasswordDefaultHash $ fdPasswordMinLength $ fdPasswordMinDiffer $ fdHandleExpiredAccounts $ fdSaslRealm $ fdSaslExop $ fdForcePasswordDefaultHash $ fdPasswordAllowedHashes $ diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc index 1095952027751941dcb82faaf1cca4a477434af5..bf2028d55ce3fef7275534adefe0e14d9dc55393 100644 --- a/plugins/config/class_configInLdap.inc +++ b/plugins/config/class_configInLdap.inc @@ -263,6 +263,12 @@ class configInLdap extends simplePlugin 'fdCnPattern', TRUE, '%givenName% %sn%' ), + new BooleanAttribute( + _('Mandatory first name'), + _('Whether first name (givenName) should be a mandatory field on users'), + 'fdGivenNameRequired', FALSE, + TRUE + ), new BooleanAttribute( _('Strict naming policy'), _('Enables strict checking of user and group names'), diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 0cd564ba072eb042444a1d71e9cb392a7f9cc12c..25e7ea1586e15ecb1aad13b589c7ba23d75c2e5a 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -96,7 +96,7 @@ class user extends simplePlugin ), new StringAttribute( _('First name'), _('First name of this user'), - 'givenName', TRUE, + 'givenName', ($config->get_cfg_value('GivenNameRequired', 'TRUE') === 'TRUE'), '', '', '/^[^,+"?()=<>;\\\\]+$/' ), new StringAttribute(