core: added the security_limit to setParam
- params with a security greater than security_limit can not be modified - special value: security_limit < 0 disable the check (all params can be modified)
This commit is contained in:
parent
5366490603
commit
2bf3694fd0
2 changed files with 56 additions and 37 deletions
|
|
@ -391,10 +391,10 @@ class DbusObject(dbus.service.Object):
|
|||
return self._callback("sendMessage", unicode(to_jid), unicode(message), unicode(subject), unicode(mess_type), options, unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssss', out_signature='',
|
||||
in_signature='sssis', out_signature='',
|
||||
async_callbacks=None)
|
||||
def setParam(self, name, value, category, profile_key="@DEFAULT@"):
|
||||
return self._callback("setParam", unicode(name), unicode(value), unicode(category), unicode(profile_key))
|
||||
def setParam(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@"):
|
||||
return self._callback("setParam", unicode(name), unicode(value), unicode(category), security_limit, unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssia{ss}s', out_signature='',
|
||||
|
|
|
|||
|
|
@ -398,14 +398,16 @@ doc_param_1=name: name of the option
|
|||
[setParam]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=ssss
|
||||
sig_in=sssis
|
||||
sig_out=
|
||||
param_3_default="@DEFAULT@"
|
||||
param_3_default=-1
|
||||
param_4_default="@DEFAULT@"
|
||||
doc=Change a parameter
|
||||
doc_param_0=name: Name of the parameter to change
|
||||
doc_param_1=value: New Value of the parameter
|
||||
doc_param_2=category: Category of the parameter to change
|
||||
doc_param_3=%(doc_profile_key)s
|
||||
doc_param_3=security_limit: -1 means no security then the higher the most secure
|
||||
doc_param_4=%(doc_profile_key)s
|
||||
|
||||
[getParamA]
|
||||
type=method
|
||||
|
|
|
|||
Loading…
Reference in a new issue