schemas/base.py
brancholdstable
changeset 8746 88c71ad83d47
parent 8190 2a3c1b787688
child 9541 e8040107b97e
equal deleted inserted replaced
8507:0c111b232927 8746:88c71ad83d47
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2012 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
    49 
    49 
    50 
    50 
    51 class EmailAddress(EntityType):
    51 class EmailAddress(EntityType):
    52     """an electronic mail address associated to a short alias"""
    52     """an electronic mail address associated to a short alias"""
    53     __permissions__ = {
    53     __permissions__ = {
    54         'read':   ('managers', 'users', 'guests',), # XXX if P use_email X, U has_read_permission P
    54         # application that wishes public email, or use it for something else
       
    55         # than users (eg Company, Person), should explicitly change permissions
       
    56         'read':   ('managers', ERQLExpression('U use_email X')),
    55         'add':    ('managers', 'users',),
    57         'add':    ('managers', 'users',),
    56         'delete': ('managers', 'owners', ERQLExpression('P use_email X, U has_update_permission P')),
    58         'delete': ('managers', 'owners', ERQLExpression('P use_email X, U has_update_permission P')),
    57         'update': ('managers', 'owners', ERQLExpression('P use_email X, U has_update_permission P')),
    59         'update': ('managers', 'owners', ERQLExpression('P use_email X, U has_update_permission P')),
    58         }
    60         }
    59 
    61