hooks/security.py
changeset 9415 0ff1de2aa55d
parent 9412 8aa6c923d6c0
child 9478 2d7521881d3d
child 9536 1e39c5e91b68
equal deleted inserted replaced
9414:d8c0784038f4 9415:0ff1de2aa55d
    40         editedattrs = entity.cw_edited
    40         editedattrs = entity.cw_edited
    41     dontcheck = editedattrs.skip_security
    41     dontcheck = editedattrs.skip_security
    42     for attr in editedattrs:
    42     for attr in editedattrs:
    43         if attr in dontcheck:
    43         if attr in dontcheck:
    44             continue
    44             continue
    45         rdef = eschema.rdef(attr)
    45         rdef = eschema.rdef(attr, takefirst=True)
    46         if rdef.final: # non final relation are checked by standard hooks
    46         if rdef.final: # non final relation are checked by standard hooks
    47             perms = rdef.permissions.get(action)
    47             perms = rdef.permissions.get(action)
    48             # comparison below works because the default update perm is:
    48             # comparison below works because the default update perm is:
    49             #
    49             #
    50             #  ('managers', ERQLExpression(Any X WHERE U has_update_permission X,
    50             #  ('managers', ERQLExpression(Any X WHERE U has_update_permission X,