core: security attribute added to the parameters
- getParams, getParamsUI and getParamsForCategory have a security_limit parameter to filter - parameters with security = 0 can be retrieved/modified from Libervia
This commit is contained in:
parent
f265c51b49
commit
7652fd3a15
4 changed files with 126 additions and 71 deletions
|
|
@ -154,17 +154,17 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
def getParamA(self, name, category, attribute="value", profile_key="@DEFAULT@"):
|
||||
return unicode(self.db_core_iface.getParamA(name, category, attribute, profile_key))
|
||||
|
||||
def getParams(self, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParams(profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
def getParams(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParams(security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
|
||||
def getParamsCategories(self, ):
|
||||
return self.db_core_iface.getParamsCategories()
|
||||
|
||||
def getParamsForCategory(self, category, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParamsForCategory(category, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
def getParamsForCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParamsForCategory(category, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
|
||||
def getParamsUI(self, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParamsUI(profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
def getParamsUI(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.getParamsUI(security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
|
||||
def getPresenceStatus(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.getPresenceStatus(profile_key)
|
||||
|
|
|
|||
|
|
@ -507,7 +507,8 @@ class PrimitivusApp(QuickApp):
|
|||
self.addWindow(XMLUI(self,xml_data=params))
|
||||
def failure(error):
|
||||
self.showPopUp(sat_widgets.Alert(_("Error"), _("Can't get parameters"), ok_cb=self.removePopUp))
|
||||
self.bridge.getParamsUI(self.profile, callback=success, errback=failure)
|
||||
security_limit = -1
|
||||
self.bridge.getParamsUI(security_limit, self.profile, callback=success, errback=failure)
|
||||
|
||||
|
||||
def onExitRequest(self, menu):
|
||||
|
|
|
|||
|
|
@ -363,7 +363,8 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
|
||||
def onParam(self, e):
|
||||
debug(_("Param request"))
|
||||
#xmlui = self.bridge.getParamsUI(self.profile)
|
||||
#security_limit = -1
|
||||
#xmlui = self.bridge.getParamsUI(security_limit, profile_key=self.profile)
|
||||
#XMLUI(self, xml_data = xmlui)
|
||||
param=Param(self)
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,11 @@ class Param(wx.Frame):
|
|||
self.notebook.AddPage(panel, category)
|
||||
cat_dom.unlink()
|
||||
|
||||
self.host.bridge.getParamsForCategory(category, profile_key = self.host.profile, callback = gotParams, errback = errorGettingParams)
|
||||
self.host.bridge.getParamsForCategory(category,
|
||||
security_limit=-1,
|
||||
profile_key=self.host.profile,
|
||||
callback=gotParams,
|
||||
errback=errorGettingParams)
|
||||
|
||||
def onTextChanged(self, event):
|
||||
"""Called when a string paramater is modified"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue