hooks/security.py
changeset 8239 c6cdd060212e
parent 8190 2a3c1b787688
parent 8238 087bb529035c
child 9129 6c4ae3a06619
equal deleted inserted replaced
8237:f854cf9b089e 8239:c6cdd060212e
    29 
    29 
    30 def check_entity_attributes(session, entity, editedattrs=None, creation=False):
    30 def check_entity_attributes(session, entity, editedattrs=None, creation=False):
    31     eid = entity.eid
    31     eid = entity.eid
    32     eschema = entity.e_schema
    32     eschema = entity.e_schema
    33     # ._cw_skip_security_attributes is there to bypass security for attributes
    33     # ._cw_skip_security_attributes is there to bypass security for attributes
    34     # set by hooks by modifying the entity's dictionnary
    34     # set by hooks by modifying the entity's dictionary
    35     if editedattrs is None:
    35     if editedattrs is None:
    36         editedattrs = entity.cw_edited
    36         editedattrs = entity.cw_edited
    37     dontcheck = editedattrs.skip_security
    37     dontcheck = editedattrs.skip_security
    38     for attr in editedattrs:
    38     for attr in editedattrs:
    39         if attr in dontcheck:
    39         if attr in dontcheck: