core (memory/params): added extra argument to filter out params notably in getParamsUI:
In some case, it may be desirable for a frontend to not expose some parameters to user (e.g. it is the case on Android with the `autoconnect_backend` parameter). An new `extra` parameter has been added to a couple of parameters method for that: it can contain the `ignore` key with a list of [category, name] of parameters to skip.
This commit is contained in:
parent
610a8ff10b
commit
87659cf0f0
1 changed files with 244 additions and 232 deletions
|
|
@ -1130,29 +1130,24 @@ class Memory(object):
|
|||
name, category, attr, security_limit, profile_key
|
||||
)
|
||||
|
||||
def asyncGetParamsValuesFromCategory(
|
||||
self, category, security_limit=C.NO_SECURITY_LIMIT, profile_key=C.PROF_KEY_NONE
|
||||
def _getParamsValuesFromCategory(
|
||||
self, category, security_limit, app, extra_s, profile_key
|
||||
):
|
||||
return self.params.asyncGetParamsValuesFromCategory(
|
||||
category, security_limit, profile_key
|
||||
return self.params._getParamsValuesFromCategory(
|
||||
category, security_limit, app, extra_s, profile_key
|
||||
)
|
||||
|
||||
def asyncGetStringParamA(
|
||||
self,
|
||||
name,
|
||||
category,
|
||||
attr="value",
|
||||
security_limit=C.NO_SECURITY_LIMIT,
|
||||
profile_key=C.PROF_KEY_NONE,
|
||||
):
|
||||
return self.params.asyncGetStringParamA(
|
||||
name, category, attr, security_limit, profile_key
|
||||
)
|
||||
self, name, category, attr="value", security_limit=C.NO_SECURITY_LIMIT,
|
||||
profile_key=C.PROF_KEY_NONE):
|
||||
|
||||
def getParamsUI(
|
||||
self, security_limit=C.NO_SECURITY_LIMIT, app="", profile_key=C.PROF_KEY_NONE
|
||||
):
|
||||
return self.params.getParamsUI(security_limit, app, profile_key)
|
||||
profile = self.getProfileName(profile_key)
|
||||
return defer.ensureDeferred(self.params.asyncGetStringParamA(
|
||||
name, category, attr, security_limit, profile
|
||||
))
|
||||
|
||||
def _getParamsUI(self, security_limit, app, extra_s, profile_key):
|
||||
return self.params._getParamsUI(security_limit, app, extra_s, profile_key)
|
||||
|
||||
def getParamsCategories(self):
|
||||
return self.params.getParamsCategories()
|
||||
|
|
|
|||
Loading…
Reference in a new issue