comparison src/server/server.py @ 746:25984ca4aef2

server side: special handling of Connection/JabberID and Connection/autoconnect parameter which has needed by QuickApp but restricted by security limit
author Goffi <goffi@goffi.org>
date Mon, 23 Nov 2015 14:19:25 +0100
parents ad733b670cc3
children 8ac862f6e5b3
comparison
equal deleted inserted replaced
745:ad733b670cc3 746:25984ca4aef2
628 return self.asyncBridgeCall("getParamsUI", C.SECURITY_LIMIT, C.APP_NAME, profile) 628 return self.asyncBridgeCall("getParamsUI", C.SECURITY_LIMIT, C.APP_NAME, profile)
629 629
630 def jsonrpc_asyncGetParamA(self, param, category, attribute="value"): 630 def jsonrpc_asyncGetParamA(self, param, category, attribute="value"):
631 """Return the parameter value for profile""" 631 """Return the parameter value for profile"""
632 profile = ISATSession(self.session).profile 632 profile = ISATSession(self.session).profile
633 if category == "Connection":
634 # we need to manage the followings params here, else SECURITY_LIMIT would block them
635 if param == "JabberID":
636 return self.asyncBridgeCall("asyncGetParamA", param, category, attribute, profile_key=profile)
637 elif param == "autoconnect":
638 return defer.succeed(C.BOOL_TRUE)
633 d = self.asyncBridgeCall("asyncGetParamA", param, category, attribute, C.SECURITY_LIMIT, profile_key=profile) 639 d = self.asyncBridgeCall("asyncGetParamA", param, category, attribute, C.SECURITY_LIMIT, profile_key=profile)
634 return d 640 return d
635 641
636 def jsonrpc_setParam(self, name, value, category): 642 def jsonrpc_setParam(self, name, value, category):
637 profile = ISATSession(self.session).profile 643 profile = ISATSession(self.session).profile