comparison src/core/sat_main.py @ 641:49587e170f53

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)
author souliane <souliane@mailoo.org>
date Sat, 07 Sep 2013 02:03:17 +0200
parents 7ea6d5a86e58
children 2a7185b8452c
comparison
equal deleted inserted replaced
640:8211b462af6b 641:49587e170f53
412 deferred = iq.send(target) 412 deferred = iq.send(target)
413 return (iq['id'], deferred) 413 return (iq['id'], deferred)
414 414
415 ## Client management ## 415 ## Client management ##
416 416
417 def setParam(self, name, value, category, profile_key): 417 def setParam(self, name, value, category, security_limit, profile_key):
418 """set wanted paramater and notice observers""" 418 """set wanted paramater and notice observers"""
419 info(_("setting param: %(name)s=%(value)s in category %(category)s") % {'name': name, 'value': value, 'category': category}) 419 info(_("setting param: %(name)s=%(value)s in category %(category)s") % {'name': name, 'value': value, 'category': category})
420 self.memory.setParam(name, value, category, profile_key) 420 self.memory.setParam(name, value, category, security_limit, profile_key)
421 421
422 def isConnected(self, profile_key): 422 def isConnected(self, profile_key):
423 """Return connection status of profile 423 """Return connection status of profile
424 @param profile_key: key_word or profile name to determine profile name 424 @param profile_key: key_word or profile name to determine profile name
425 @return True if connected 425 @return True if connected