schemas/base.py
changeset 10411 4ee15441f2eb
parent 10371 88577b10b31e
parent 10386 82071f767cb8
child 10624 48e54aabcd55
equal deleted inserted replaced
10410:eb681a030699 10411:4ee15441f2eb
    24                             SubjectRelation,
    24                             SubjectRelation,
    25                             String, TZDatetime, Datetime, Password, Interval,
    25                             String, TZDatetime, Datetime, Password, Interval,
    26                             Boolean, UniqueConstraint)
    26                             Boolean, UniqueConstraint)
    27 from cubicweb.schema import (
    27 from cubicweb.schema import (
    28     RQLConstraint, WorkflowableEntityType, ERQLExpression, RRQLExpression,
    28     RQLConstraint, WorkflowableEntityType, ERQLExpression, RRQLExpression,
    29     PUB_SYSTEM_ENTITY_PERMS, PUB_SYSTEM_REL_PERMS, PUB_SYSTEM_ATTR_PERMS)
    29     PUB_SYSTEM_ENTITY_PERMS, PUB_SYSTEM_REL_PERMS, PUB_SYSTEM_ATTR_PERMS,
       
    30     RO_ATTR_PERMS)
    30 
    31 
    31 class CWUser(WorkflowableEntityType):
    32 class CWUser(WorkflowableEntityType):
    32     """define a CubicWeb user"""
    33     """define a CubicWeb user"""
    33     __permissions__ = {
    34     __permissions__ = {
    34         'read':   ('managers', 'users', ERQLExpression('X identity U')),
    35         'read':   ('managers', 'users', ERQLExpression('X identity U')),
   158     subject = '*'
   159     subject = '*'
   159     object = 'Datetime'
   160     object = 'Datetime'
   160 
   161 
   161 class cwuri(RelationType):
   162 class cwuri(RelationType):
   162     """internal entity uri"""
   163     """internal entity uri"""
   163     __permissions__ = PUB_SYSTEM_ATTR_PERMS
   164     __permissions__ = RO_ATTR_PERMS
   164     cardinality = '11'
   165     cardinality = '11'
   165     subject = '*'
   166     subject = '*'
   166     object = 'String'
   167     object = 'String'
   167     constraints = [UniqueConstraint()]
   168     constraints = [UniqueConstraint()]
   168 
   169