Mercurial > libervia-web
comparison libervia.tac @ 229:e632f77c4219
bridge: asyncGetParamA takes a security_limit argument
browser_side: added support for user param of type "list"
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 08 Oct 2013 13:48:00 +0200 |
parents | 36673d19c87e |
children | b304cdf13a3b |
comparison
equal
deleted
inserted
replaced
228:6efd189e8d78 | 229:e632f77c4219 |
---|---|
408 from sat.tools.xml_tools import paramsXml2xmlUI | 408 from sat.tools.xml_tools import paramsXml2xmlUI |
409 d.addCallback(lambda d: paramsXml2xmlUI(d) if d else "") | 409 d.addCallback(lambda d: paramsXml2xmlUI(d) if d else "") |
410 | 410 |
411 return d | 411 return d |
412 | 412 |
413 def jsonrpc_asyncGetParamA(self, param, category, attribute="value"): | |
414 """Return the parameter value for profile""" | |
415 profile = ISATSession(self.session).profile | |
416 d = self.asyncBridgeCall("asyncGetParamA", param, category, attribute, SECURITY_LIMIT, profile_key=profile) | |
417 return d | |
418 | |
413 def jsonrpc_setParam(self, name, value, category): | 419 def jsonrpc_setParam(self, name, value, category): |
414 profile = ISATSession(self.session).profile | 420 profile = ISATSession(self.session).profile |
415 if category in self.authorized_params and name in self.authorized_params[category]: | 421 if category in self.authorized_params and name in self.authorized_params[category]: |
416 return self.sat_host.bridge.setParam(name, value, category, SECURITY_LIMIT, profile) | 422 return self.sat_host.bridge.setParam(name, value, category, SECURITY_LIMIT, profile) |
417 else: | 423 else: |