From cffe678ca363712ab3c4eebacd317aaacb63a639 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 29 Apr 2016 15:22:11 +0200 Subject: [PATCH] Default settings for basic node_types --- pillar/manage_extra/node_types/asset.py | 15 +++++---------- pillar/manage_extra/node_types/comment.py | 6 ------ pillar/manage_extra/node_types/group.py | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/pillar/manage_extra/node_types/asset.py b/pillar/manage_extra/node_types/asset.py index 37a8a1b1..084d6d10 100644 --- a/pillar/manage_extra/node_types/asset.py +++ b/pillar/manage_extra/node_types/asset.py @@ -5,7 +5,7 @@ node_type_asset = { 'description': 'Basic Asset Type', # This data type does not have parent limitations (can be child # of any node). An empty parent declaration is required. - 'parent': ['group',], + 'parent': ['group', ], 'dyn_schema': { 'status': { 'type': 'string', @@ -31,7 +31,7 @@ node_type_asset = { 'attachments': { 'type': 'list', 'schema': { - 'type': 'dict', + 'type': 'dict', 'schema': { 'field': {'type': 'string'}, 'files' : { @@ -64,17 +64,12 @@ node_type_asset = { 'form_schema': { 'status': {}, 'content_type': {'visible': False}, - 'file': {'visible': False}, + 'file': {}, 'attachments': {'visible': False}, 'order': {}, - 'tags' : {}, - 'categories': {} + 'tags': {'visible': False}, + 'categories': {'visible': False} }, 'permissions': { - # 'groups': [{ - # 'group': app.config['ADMIN_USER_GROUP'], - # 'methods': ['GET', 'PUT', 'POST'] - # }], - # 'users': [], } } diff --git a/pillar/manage_extra/node_types/comment.py b/pillar/manage_extra/node_types/comment.py index bd25d245..0e2ddd8f 100644 --- a/pillar/manage_extra/node_types/comment.py +++ b/pillar/manage_extra/node_types/comment.py @@ -62,11 +62,5 @@ node_type_comment = { }, 'parent': ['asset', 'comment'], 'permissions': { - # 'groups': [{ - # 'group': app.config['ADMIN_USER_GROUP'], - # 'methods': ['GET', 'PUT', 'POST'] - # }], - # 'users': [], - # 'world': ['GET'] } } diff --git a/pillar/manage_extra/node_types/group.py b/pillar/manage_extra/node_types/group.py index 5fb7a4a3..8faab916 100644 --- a/pillar/manage_extra/node_types/group.py +++ b/pillar/manage_extra/node_types/group.py @@ -24,7 +24,7 @@ node_type_group = { }, }, 'form_schema': { - 'url': {}, + 'url': {'visible': False}, 'status': {}, 'notes': {}, 'order': {}