should return item type not relation
authorSandrine Ribeau <sandrine.ribeau@logilab.fr>
Mon, 07 Dec 2009 06:45:51 -0800
changeset 4005 dee7af82beff
parent 4004 c52619c738a5
child 4006 c89be0bdf943
should return item type not relation
schema.py
--- a/schema.py	Mon Dec 07 06:39:35 2009 -0800
+++ b/schema.py	Mon Dec 07 06:45:51 2009 -0800
@@ -425,11 +425,11 @@
     def has_perm(self, session, action, **kwargs):
         """return true if the action is granted globaly or localy"""
         if 'fromeid' in kwargs:
-            subjtype = session.describe(kwargs['fromeid'])
+            subjtype = session.describe(kwargs['fromeid'])[0]
         else:
             subjtype = None
         if 'toeid' in kwargs:
-            objtype = session.describe(kwargs['toeid'])
+            objtype = session.describe(kwargs['toeid'])[0]
         else:
             objtype = Nono
         if objtype and subjtype: