test/data/rrqlexpr_on_attr.py
branchstable
changeset 9633 0176da9bc752
parent 5424 8ecbcbff9777
equal deleted inserted replaced
9600:bde625698f44 9633:0176da9bc752
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """
       
    19 
    18 
    20 """
       
    21 from yams.buildobjs import EntityType, RelationType, String
    19 from yams.buildobjs import EntityType, RelationType, String
    22 from cubicweb.schema import RRQLExpression
    20 from cubicweb.schema import RRQLExpression
    23 
    21 
    24 class ToTo(EntityType):
    22 class ToTo(EntityType):
    25     __permissions__ = {
    23     __permissions__ = {
    32 
    30 
    33 class attr(RelationType):
    31 class attr(RelationType):
    34     __permissions__ = {
    32     __permissions__ = {
    35         'read': ('managers', ),
    33         'read': ('managers', ),
    36         'update': ('managers', RRQLExpression('S bla Y'),),
    34         'update': ('managers', RRQLExpression('S bla Y'),),
       
    35         'add': ('managers', RRQLExpression('S bla Y'),),
    37         }
    36         }