Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
0cb7d04c
Commit
0cb7d04c
authored
Oct 22, 2018
by
Lukas Burgey
Browse files
Fix the profile_name of admin users
parent
e1c7075f
Changes
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/models/users.py
View file @
0cb7d04c
...
...
@@ -65,10 +65,14 @@ class User(AbstractUser):
def
profile_name
(
self
):
if
'email'
in
self
.
userinfo
:
return
self
.
userinfo
[
'email'
]
elif
'name'
in
self
.
userinfo
:
if
'name'
in
self
.
userinfo
:
return
self
.
userinfo
[
'name'
]
return
self
.
id
if
'sub'
in
self
.
userinfo
:
return
self
.
userinfo
[
'sub'
]
return
self
.
username
@
property
def
deployment_state_items
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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