Commit 0cb7d04c authored by Lukas Burgey's avatar Lukas Burgey

Fix the profile_name of admin users

parent e1c7075f
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment