2023-09-15 13:26:45 +02:00
|
|
|
diff --git a/internal/core/user.go b/internal/core/user.go
|
2023-09-15 19:24:27 +02:00
|
|
|
index e74ccfe..ce03eeb 100644
|
2023-09-15 13:26:45 +02:00
|
|
|
--- a/internal/core/user.go
|
|
|
|
+++ b/internal/core/user.go
|
2023-09-15 19:24:27 +02:00
|
|
|
@@ -64,7 +64,6 @@ func (u User) RenderToLDAP(suffix string, allGroups map[string]Group) LDAPObject
|
2023-09-15 13:26:45 +02:00
|
|
|
"uid": {u.LoginName},
|
|
|
|
"cn": {u.FullName()},
|
|
|
|
"sn": {u.FamilyName},
|
|
|
|
- "givenName": {u.GivenName},
|
|
|
|
"userPassword": {u.PasswordHash},
|
|
|
|
"isMemberOf": memberOfGroupDNames,
|
|
|
|
"objectClass": {"portunusPerson", "inetOrgPerson", "organizationalPerson", "person", "top"},
|
2023-09-15 19:24:27 +02:00
|
|
|
@@ -74,6 +73,9 @@ func (u User) RenderToLDAP(suffix string, allGroups map[string]Group) LDAPObject
|
2023-09-15 13:26:45 +02:00
|
|
|
if u.EMailAddress != "" {
|
|
|
|
obj.Attributes["mail"] = []string{u.EMailAddress}
|
|
|
|
}
|
|
|
|
+ if u.GivenName != "" {
|
|
|
|
+ obj.Attributes["givenName"] = []string{u.GivenName}
|
|
|
|
+ }
|
|
|
|
if len(u.SSHPublicKeys) > 0 {
|
|
|
|
obj.Attributes["sshPublicKey"] = u.SSHPublicKeys
|
|
|
|
}
|
2023-09-15 19:24:27 +02:00
|
|
|
diff --git a/internal/frontend/users.go b/internal/frontend/users.go
|
|
|
|
index 225c5b3..1a961ca 100644
|
|
|
|
--- a/internal/frontend/users.go
|
|
|
|
+++ b/internal/frontend/users.go
|
|
|
|
@@ -168,7 +168,6 @@ func buildUserMasterdataFieldset(e core.Engine, u *core.User, state *h.FormState
|
|
|
|
Name: "given_name",
|
|
|
|
Label: "Given name",
|
|
|
|
Rules: []h.ValidationRule{
|
|
|
|
- core.MustNotBeEmpty,
|
|
|
|
core.MustNotHaveSurroundingSpaces,
|
|
|
|
},
|
|
|
|
},
|