[hooks/security] silence yams warning (Related to #2965518)

Yams 0.39 introduces a warning silencer for those that ask the rdef of an attribute. Let us use it right now.

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changesetf9e682fb0408
branchdefault
phasedraft
hiddenyes
parent revision#5f10cd13224d defaultval migration for sqlite
child revision#7867fba7fdea [hooks/security] provide attribute "add" permission, #6be335c09124 [hooks/security] provide attribute "add" permission
files modified by this revision
hooks/security.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1381408150 -7200
# Thu Oct 10 14:29:10 2013 +0200
# Node ID f9e682fb04084c281855b738468cbddba3aaddc4
# Parent 5f10cd13224d8bd6f56a33103c7486c08ab0af15
[hooks/security] silence yams warning (Related to #2965518)

Yams 0.39 introduces a warning silencer for those that ask the rdef of an attribute.
Let us use it right now.

diff --git a/hooks/security.py b/hooks/security.py
@@ -39,11 +39,11 @@
1          editedattrs = entity.cw_edited
2      dontcheck = editedattrs.skip_security
3      for attr in editedattrs:
4          if attr in dontcheck:
5              continue
6 -        rdef = eschema.rdef(attr)
7 +        rdef = eschema.rdef(attr, takefirst=True)
8          if rdef.final: # non final relation are checked by standard hooks
9              # attributes only have a specific 'update' permission
10              updateperm = rdef.permissions.get('update')
11              # comparison below works because the default update perm is:
12              #