From 85a53d061a07c340e4ddca3586f6ee51de727a50 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Sun, 23 Feb 2020 20:23:42 -0500 Subject: [PATCH] WIP more serializer stuff --- keyosk/serializers/domain.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/keyosk/serializers/domain.py b/keyosk/serializers/domain.py index e74d1cc..dea344c 100644 --- a/keyosk/serializers/domain.py +++ b/keyosk/serializers/domain.py @@ -21,18 +21,9 @@ class DomainSerializer(msh.Schema): enable_refresh = msh.fields.Boolean(required=True, data_key="enable-refresh") lifespan_access = msh.fields.Boolean(required=True, data_key="lifespan-access") lifespan_refresh = msh.fields.Boolean(required=True, data_key="lifespan-refresh") - access_lists = msh.fields.List() - - # created = peewee.DateTimeField(null=False, default=datetime.datetime.utcnow) - # updated = peewee.DateTimeField(null=False, default=datetime.datetime.utcnow) - # name = peewee.CharField(null=False, unique=True) - # audience = peewee.CharField(null=False, unique=True) - # title = peewee.CharField(null=True) - # description = peewee.CharField(null=True) - # contact = peewee.CharField(null=True) - # enabled = peewee.BooleanField(null=False) - # enable_client_set_auth = peewee.BooleanField(null=False) - # enable_server_set_auth = peewee.BooleanField(null=False) - # enable_refresh = peewee.BooleanField(null=False) - # lifespan_access = peewee.IntegerField(null=False) - # lifespan_refresh = peewee.IntegerField(null=False) + access_list_names = msh.fields.List( + msh.fields.String(), required=True, data_key="access-lists" + ) + permission_names = msh.fields.List( + msh.fields.String(), required=True, data_key="permissions" + )