Unverified Commit b9825e6b authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(core) Add an option whether givenName should be required

issue #6181
Showing with 14 additions and 2 deletions
+14 -2
......@@ -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 $
......
......@@ -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'),
......
......@@ -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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment