core: security limit in menus
This commit is contained in:
parent
d5b255e437
commit
aad6251058
3 changed files with 8 additions and 5 deletions
|
|
@ -212,7 +212,7 @@ class XEP_0050(object):
|
|||
method=self._requestCommandsList,
|
||||
async=True)
|
||||
self.__requesting_id = host.registerCallback(self._requestingEntity, with_data=True)
|
||||
host.importMenu((D_("Service"), D_("commands")), self._commandsMenu, help_string=D_("Execute ad-hoc commands"))
|
||||
host.importMenu((D_("Service"), D_("commands")), self._commandsMenu, security_limit=4, help_string=D_("Execute ad-hoc commands"))
|
||||
|
||||
def getHandler(self, profile):
|
||||
return XEP_0050_handler(self)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class XEP_0055(object):
|
|||
self._sessions = Sessions()
|
||||
self.__menu_cb_id = host.registerCallback(self._menuCb, with_data=True)
|
||||
self.__search_request_id = host.registerCallback(self._xmluiSearchRequest, with_data=True)
|
||||
host.importMenu((D_("Communication"), D_("Search directory")), self._searchMenu, help_string=D_("Search use directory"))
|
||||
host.importMenu((D_("Communication"), D_("Search directory")), self._searchMenu, security_limit=1, help_string=D_("Search use directory"))
|
||||
|
||||
def _menuCb(self, data, profile):
|
||||
entity = jid.JID(data[xml_tools.SAT_FORM_PREFIX+'jid'])
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class XEP_0100(object):
|
|||
host.bridge.addMethod("gatewayRegister", ".plugin", in_sign='ss', out_sign='s', method=self._gatewayRegister)
|
||||
self.__menu_id = host.registerCallback(self._gatewaysMenu, with_data=True)
|
||||
self.__selected_id = host.registerCallback(self._gatewaySelectedCb, with_data=True)
|
||||
host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, help_string=D_("Find gateways"))
|
||||
host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, security_limit=2, help_string=D_("Find gateways"))
|
||||
|
||||
|
||||
def _gatewaysMenu(self, data, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue