Commit b0821d8c authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Cleanup user

parent 7c06120d
...@@ -84,6 +84,12 @@ class User(AbstractUser): ...@@ -84,6 +84,12 @@ class User(AbstractUser):
items.append(item) items.append(item)
return items return items
# we hide deleted keys here
# the full list of ssh keys is self._ssh_keys
@property
def ssh_keys(self):
return self._ssh_keys.filter(deleted=False)
@property @property
def credentials(self): def credentials(self):
return { return {
...@@ -96,6 +102,10 @@ class User(AbstractUser): ...@@ -96,6 +102,10 @@ class User(AbstractUser):
] ]
} }
@property
def is_active_at_clients(self):
return self._is_active
# returns the user as identified by userinfo and idp # returns the user as identified by userinfo and idp
# if the user does not exists # if the user does not exists
@classmethod @classmethod
...@@ -158,16 +168,6 @@ class User(AbstractUser): ...@@ -158,16 +168,6 @@ class User(AbstractUser):
client.set_password(password) client.set_password(password)
return client return client
# we hide deleted keys here
# the full list of ssh keys is self._ssh_keys
@property
def ssh_keys(self):
return self._ssh_keys.filter(deleted=False)
@property
def is_active_at_clients(self):
return self._is_active
def __str__(self): def __str__(self):
name = '' name = ''
......
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