UNPKG

openframe-apiserver

Version:
82 lines (81 loc) 1.59 kB
{ "name": "Collection", "plural": "collections", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true }, "mixins": { "Timestamp": {} }, "properties": { "name": { "type": "string", "required": false }, "description": { "type": "string", "required": false }, "is_public": { "type": "boolean", "required": true, "default": true }, "thumb_url": { "type": "string" } }, "validations": [], "relations": { "owner": { "type": "belongsTo", "model": "OpenframeUser", "foreignKey": "ownerId" }, "current_artwork": { "type": "embedsOne", "model": "Artwork", "property": "current_artwork" }, "artwork": { "type": "hasAndBelongsToMany", "model": "Artwork" } }, "acls": [ { "accessType": "*", "principalType": "ROLE", "principalId": "$everyone", "permission": "DENY" }, { "accessType": "READ", "principalType": "ROLE", "principalId": "$everyone", "permission": "ALLOW" }, { "accessType": "EXECUTE", "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW", "property": "create" }, { "accessType": "WRITE", "principalType": "ROLE", "principalId": "$owner", "permission": "ALLOW" }, { "accessType": "*", "principalType": "ROLE", "principalId": "admin", "permission": "ALLOW" } ], "methods": {} }