comparison src/plugins/plugin_xep_0100.py @ 809:743b757777d3

core: security limit in menus
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:32:39 +0100
parents be4c5e24dab9
children 1fe00f0c9a91
comparison
equal deleted inserted replaced
808:d035c662b357 809:743b757777d3
60 self.__gateways = {} # dict used to construct the answer to findGateways. Key = target jid 60 self.__gateways = {} # dict used to construct the answer to findGateways. Key = target jid
61 host.bridge.addMethod("findGateways", ".plugin", in_sign='ss', out_sign='s', method=self._findGateways) 61 host.bridge.addMethod("findGateways", ".plugin", in_sign='ss', out_sign='s', method=self._findGateways)
62 host.bridge.addMethod("gatewayRegister", ".plugin", in_sign='ss', out_sign='s', method=self._gatewayRegister) 62 host.bridge.addMethod("gatewayRegister", ".plugin", in_sign='ss', out_sign='s', method=self._gatewayRegister)
63 self.__menu_id = host.registerCallback(self._gatewaysMenu, with_data=True) 63 self.__menu_id = host.registerCallback(self._gatewaysMenu, with_data=True)
64 self.__selected_id = host.registerCallback(self._gatewaySelectedCb, with_data=True) 64 self.__selected_id = host.registerCallback(self._gatewaySelectedCb, with_data=True)
65 host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, help_string=D_("Find gateways")) 65 host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, security_limit=2, help_string=D_("Find gateways"))
66 66
67 67
68 def _gatewaysMenu(self, data, profile): 68 def _gatewaysMenu(self, data, profile):
69 """ XMLUI activated by menu: return Gateways UI 69 """ XMLUI activated by menu: return Gateways UI
70 @param profile: %(doc_profile)s 70 @param profile: %(doc_profile)s