Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uffd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rixx
uffd
Commits
4a705c11
Commit
4a705c11
authored
4 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
fixed tests after they broke by
a827f27b
parent
f68f17f6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uffd/user/models.py
+7
-2
7 additions, 2 deletions
uffd/user/models.py
with
7 additions
and
2 deletions
uffd/user/models.py
+
7
−
2
View file @
4a705c11
...
...
@@ -7,7 +7,7 @@ from flask import current_app
from
uffd
import
ldap
class
User
():
def
__init__
(
self
,
uid
=
None
,
loginname
=
''
,
displayname
=
''
,
mail
=
''
,
groups
=
None
,
dn
=
None
,
uuid
=
None
):
def
__init__
(
self
,
uid
=
None
,
loginname
=
''
,
displayname
=
''
,
mail
=
''
,
groups
=
None
,
dn
=
None
,
uuid
=
None
):
# pylint: disable=too-many-arguments
self
.
uid
=
uid
self
.
loginname
=
loginname
self
.
displayname
=
displayname
...
...
@@ -30,7 +30,12 @@ class User():
mail
=
ldapobject
[
'
mail
'
].
value
,
groups
=
ldap
.
get_ldap_array_attribute_safe
(
ldapobject
,
'
memberOf
'
),
dn
=
ldapobject
.
entry_dn
,
uuid
=
ldapobject
[
'
entryUUID
'
].
value
# The LDAP mock does not generate UUIDs for newly created LDAP objects,
# so we use a dummy value if the attribute is missing (only for testing!)
uuid
=
ldapobject
[
'
entryUUID
'
].
value
\
if
'
entryUUID
'
in
ldapobject
.
entry_attributes_as_dict
\
or
not
current_app
.
config
.
get
(
'
LDAP_SERVICE_MOCK
'
,
False
)
\
else
'
00000000-0000-0000-0000-000000000000
'
)
@classmethod
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment