1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Accounts app improvements and tests

This commit is contained in:
Real-Gecko 2020-10-14 14:37:46 +06:00 committed by catborise
parent 8afef36656
commit 5172a9f619
20 changed files with 622 additions and 227 deletions

View file

@ -204,6 +204,10 @@ class Instance(models.Model):
def formats(self):
return self.proxy.get_image_formats()
@cached_property
def interfaces(self):
return self.proxy.get_ifaces()
class PermissionSet(models.Model):
"""
@ -211,8 +215,9 @@ class PermissionSet(models.Model):
"""
class Meta:
default_permissions = ()
permissions = [('clone_instances', 'Can clone instances'),
('passwordless_console', _('Can access console without password')),
]
permissions = [
('clone_instances', 'Can clone instances'),
('passwordless_console', _('Can access console without password')),
]
managed = False