schemas/base.py
changeset 2438 576f4d51f826
parent 2297 4cf57dd80650
child 2441 d7f0e551d0fa
equal deleted inserted replaced
2433:1d46c016a564 2438:576f4d51f826
   100         'delete': ('managers', RRQLExpression('S owned_by U'),),
   100         'delete': ('managers', RRQLExpression('S owned_by U'),),
   101         }
   101         }
   102     # 0..n cardinality for entities created by internal session (no attached user)
   102     # 0..n cardinality for entities created by internal session (no attached user)
   103     # and to support later deletion of a user which has created some entities
   103     # and to support later deletion of a user which has created some entities
   104     cardinality = '**'
   104     cardinality = '**'
   105     subject = '**'
   105     subject = '*'
   106     object = 'CWUser'
   106     object = 'CWUser'
   107 
   107 
   108 class created_by(RelationType):
   108 class created_by(RelationType):
   109     """core relation indicating the original creator of an entity"""
   109     """core relation indicating the original creator of an entity"""
   110     permissions = {
   110     permissions = {
   113         'delete': ('managers',),
   113         'delete': ('managers',),
   114         }
   114         }
   115     # 0..1 cardinality for entities created by internal session (no attached user)
   115     # 0..1 cardinality for entities created by internal session (no attached user)
   116     # and to support later deletion of a user which has created some entities
   116     # and to support later deletion of a user which has created some entities
   117     cardinality = '?*'
   117     cardinality = '?*'
   118     subject = '**'
   118     subject = '*'
   119     object = 'CWUser'
   119     object = 'CWUser'
   120 
   120 
   121 
   121 
   122 class creation_date(RelationType):
   122 class creation_date(RelationType):
   123     """creation time of an entity"""
   123     """creation time of an entity"""
   124     cardinality = '11'
   124     cardinality = '11'
   125     subject = '**'
   125     subject = '*'
   126     object = 'Datetime'
   126     object = 'Datetime'
   127 
   127 
   128 class modification_date(RelationType):
   128 class modification_date(RelationType):
   129     """latest modification time of an entity"""
   129     """latest modification time of an entity"""
   130     cardinality = '11'
   130     cardinality = '11'
   131     subject = '**'
   131     subject = '*'
   132     object = 'Datetime'
   132     object = 'Datetime'
   133 
   133 
   134 
   134 
   135 class CWProperty(EntityType):
   135 class CWProperty(EntityType):
   136     """used for cubicweb configuration. Once a property has been created you
   136     """used for cubicweb configuration. Once a property has been created you