Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
accountserver
Commits
a9615dd8
Commit
a9615dd8
authored
Nov 12, 2018
by
ale
Browse files
Add the investiciUser objectClass to user objects
parent
470df2e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
backend/model.go
View file @
a9615dd8
...
...
@@ -149,7 +149,7 @@ func newUser(entry *ldap.Entry) (*as.RawUser, error) {
func
userToLDAP
(
user
*
as
.
User
)
(
attrs
[]
ldap
.
PartialAttribute
)
{
// Most attributes are read-only and have specialized methods to set them.
attrs
=
append
(
attrs
,
[]
ldap
.
PartialAttribute
{
{
Type
:
"objectClass"
,
Vals
:
[]
string
{
"top"
,
"person"
,
"posixAccount"
,
"shadowAccount"
,
"organizationalPerson"
,
"inetOrgPerson"
,
"
totpAccount
"
}},
{
Type
:
"objectClass"
,
Vals
:
[]
string
{
"top"
,
"person"
,
"posixAccount"
,
"shadowAccount"
,
"organizationalPerson"
,
"inetOrgPerson"
,
"
investiciUser
"
}},
{
Type
:
"uid"
,
Vals
:
s2l
(
user
.
Name
)},
{
Type
:
"cn"
,
Vals
:
s2l
(
user
.
Name
)},
{
Type
:
uidNumberLDAPAttr
,
Vals
:
s2l
(
strconv
.
Itoa
(
user
.
UID
))},
...
...
backend/testdata/test1.ldif
View file @
a9615dd8
...
...
@@ -6,6 +6,7 @@ objectClass: posixAccount
objectClass: shadowAccount
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: investiciUser
loginShell: /bin/false
uidNumber: 19475
shadowMax: 99999
...
...
backend/testdata/test2.ldif
View file @
a9615dd8
...
...
@@ -11,6 +11,7 @@ objectClass: posixAccount
objectClass: shadowAccount
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: investiciUser
shadowLastChange: 12345
shadowMax: 99999
shadowWarning: 7
...
...
integrationtest/testdata/test1.ldif
View file @
a9615dd8
...
...
@@ -6,6 +6,7 @@ objectClass: posixAccount
objectClass: shadowAccount
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: investiciUser
loginShell: /bin/false
uidNumber: 19475
shadowMax: 99999
...
...
integrationtest/testdata/test2.ldif
View file @
a9615dd8
...
...
@@ -11,6 +11,7 @@ objectClass: posixAccount
objectClass: shadowAccount
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: investiciUser
shadowLastChange: 12345
shadowMax: 99999
shadowWarning: 7
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment