hooks/security.py
branchstable
changeset 9521 9eb810333b0f
parent 9129 6c4ae3a06619
child 9536 1e39c5e91b68
equal deleted inserted replaced
9438:1910d86afcbc 9521:9eb810333b0f
    39         editedattrs = entity.cw_edited
    39         editedattrs = entity.cw_edited
    40     dontcheck = editedattrs.skip_security
    40     dontcheck = editedattrs.skip_security
    41     for attr in editedattrs:
    41     for attr in editedattrs:
    42         if attr in dontcheck:
    42         if attr in dontcheck:
    43             continue
    43             continue
    44         rdef = eschema.rdef(attr)
    44         rdef = eschema.rdef(attr, takefirst=True)
    45         if rdef.final: # non final relation are checked by standard hooks
    45         if rdef.final: # non final relation are checked by standard hooks
    46             # attributes only have a specific 'update' permission
    46             # attributes only have a specific 'update' permission
    47             updateperm = rdef.permissions.get('update')
    47             updateperm = rdef.permissions.get('update')
    48             # comparison below works because the default update perm is:
    48             # comparison below works because the default update perm is:
    49             #
    49             #