From: Thierry Parmentelat Date: Sun, 28 Nov 2010 16:29:07 +0000 (+0100) Subject: always invoke caller_my_access_tag X-Git-Tag: plcapi-5.0-19~23 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ef6fbf74f6d6513e4f69b66352e6ba9c17d19cc3;p=plcapi.git always invoke caller_my_access_tag --- diff --git a/PLC/Accessors/Factory.py b/PLC/Accessors/Factory.py index a207513a..b1ef2996 100644 --- a/PLC/Accessors/Factory.py +++ b/PLC/Accessors/Factory.py @@ -181,8 +181,9 @@ def define_accessors (module, objclass, methodsuffix, tagname, tag_type_id = tag_type['tag_type_id'] # check authorization - if hasattr(objclass,'caller_may_write_tag'): - obj.caller_may_write_tag (self.api,self.caller,tag_type) + if not hasattr(objclass,'caller_may_write_tag'): + raise PLCAuthenticationFailure, "class %s misses method caller_may_write_tag"%objclass.__name__ + obj.caller_may_write_tag (self.api,self.caller,tag_type) # locate the join object (e.g. NodeTag or similar) filter = {'tag_type_id':tag_type_id}