Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
comment
Commits
cdd92d221bc5
Commit
cdd92d221bc5
authored
15 years ago
by
Nicolas Chauvat
Browse files
Options
Downloads
Patches
Plain Diff
[refactor] import from buildobjs and remove Meta*Entity
parent
299e02a0f03f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
schema.py
+9
-5
9 additions, 5 deletions
schema.py
with
9 additions
and
5 deletions
schema.py
+
9
−
5
View file @
cdd92d22
...
...
@@ -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
(
MetaUser
EntityType
):
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
(
MetaUser
RelationType
):
class
comments
(
RelationType
):
permissions
=
{
'
read
'
:
(
'
managers
'
,
'
users
'
,
'
guests
'
),
'
add
'
:
(
'
managers
'
,
'
users
'
,),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment