mirror of
https://github.com/enpaul/keyosk.git
synced 2024-12-26 01:33:33 +00:00
Add missing methods for casting account model to dict
This commit is contained in:
parent
ca183d7052
commit
733ffa6cd8
@ -88,4 +88,8 @@ class Account(KeyoskBaseModel):
|
||||
|
||||
@staticmethod
|
||||
def dict_keys() -> List[str]:
|
||||
return ["uuid", "created", "updated", "username", "enabled", "extras"]
|
||||
return ["uuid", "created", "updated", "username", "enabled", "extras", "acls"]
|
||||
|
||||
@staticmethod
|
||||
def foreign_backref() -> List[str]:
|
||||
return ["acls"]
|
||||
|
@ -41,3 +41,9 @@ class AccountACLEntry(KeyoskBaseModel):
|
||||
permission = peewee.ForeignKeyField(DomainPermission)
|
||||
with_server_secret = peewee.BooleanField(null=False)
|
||||
with_client_secret = peewee.BooleanField(null=False)
|
||||
|
||||
def __iter__(self):
|
||||
yield "access_list", self.access_list.name
|
||||
yield "permission", self.permission.name
|
||||
yield "with_server_secret", self.with_server_secret
|
||||
yield "with_client_secret", self.with_client_secret
|
||||
|
Loading…
Reference in New Issue
Block a user