Factoring the model user and correcting password
This commit is contained in:
parent
9a31439aca
commit
1e22377ca8
1 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
|
||||||
SN: searchRes.Entries[0].GetAttributeValue("sn"),
|
SN: searchRes.Entries[0].GetAttributeValue("sn"),
|
||||||
UID: searchRes.Entries[0].GetAttributeValue("uid"),
|
UID: searchRes.Entries[0].GetAttributeValue("uid"),
|
||||||
CN: searchRes.Entries[0].GetAttributeValue("cn"),
|
CN: searchRes.Entries[0].GetAttributeValue("cn"),
|
||||||
|
Mail: searchRes.Entries[0].GetAttributeValue("mail"),
|
||||||
CanAdmin: strings.EqualFold(user.DN, config.AdminAccount),
|
CanAdmin: strings.EqualFold(user.DN, config.AdminAccount),
|
||||||
CanInvite: true,
|
CanInvite: true,
|
||||||
UserEntry: userEntry,
|
UserEntry: userEntry,
|
||||||
|
|
Loading…
Reference in a new issue