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