Skip to content
Snippets Groups Projects
Commit cdd92d221bc5 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[refactor] import from buildobjs and remove Meta*Entity

parent 299e02a0f03f
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,7 @@
:copyright: 2003-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
from yams.buildobjs import (MetaUserEntityType, MetaUserRelationType,
SubjectRelation, RichString)
from yams.buildobjs import EntityType, RelationType, SubjectRelation, RichString
from cubicweb.schema import RRQLExpression
......@@ -8,5 +7,5 @@
from cubicweb.schema import RRQLExpression
class Comment(MetaUserEntityType):
class Comment(EntityType):
"""a comment is a reply about another entity"""
......@@ -12,2 +11,8 @@
"""a comment is a reply about another entity"""
permissions = {
'read': ('managers', 'users', 'guests',),
'add': ('managers', 'users',),
'delete': ('managers', 'owners',),
'update': ('managers', 'owners',),
}
content = RichString(required=True, fulltextindexed=True)
......@@ -13,4 +18,3 @@
content = RichString(required=True, fulltextindexed=True)
comments = SubjectRelation('Comment', cardinality='1*', composite='object')
......@@ -15,6 +19,6 @@
comments = SubjectRelation('Comment', cardinality='1*', composite='object')
class comments(MetaUserRelationType):
class comments(RelationType):
permissions = {
'read': ('managers', 'users', 'guests'),
'add': ('managers', 'users',),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment