comparison src/memory/params.py @ 1647:31b96ac3eec2

core (param), plugin file: set security_limit for acount changes, backend (dis)connection, and put a higher one for file send
author Goffi <goffi@goffi.org>
date Mon, 23 Nov 2015 13:19:42 +0100
parents 7e749e8eefd0
children 5c1d6efd6936
comparison
equal deleted inserted replaced
1646:7f0c8856e4e1 1647:31b96ac3eec2
51 <param name="%(history_param)s" label="%(history_label)s" value="20" constraint="0;100" type="int" security="0" /> 51 <param name="%(history_param)s" label="%(history_label)s" value="20" constraint="0;100" type="int" security="0" />
52 <param name="%(show_offline_contacts)s" label="%(show_offline_contacts_label)s" value="false" type="bool" security="0" /> 52 <param name="%(show_offline_contacts)s" label="%(show_offline_contacts_label)s" value="false" type="bool" security="0" />
53 <param name="%(show_empty_groups)s" label="%(show_empty_groups_label)s" value="true" type="bool" security="0" /> 53 <param name="%(show_empty_groups)s" label="%(show_empty_groups_label)s" value="true" type="bool" security="0" />
54 </category> 54 </category>
55 <category name="Connection" label="%(category_connection)s"> 55 <category name="Connection" label="%(category_connection)s">
56 <param name="JabberID" value="name@example.org" type="string" security="0" /> 56 <param name="JabberID" value="name@example.org" type="string" security="10" />
57 <param name="Password" value="" type="password" /> 57 <param name="Password" value="" type="password" security="10" />
58 <param name="Priority" value="50" type="int" constraint="-128;127"/> 58 <param name="Priority" value="50" type="int" constraint="-128;127" security="10" />
59 <param name="%(force_server_param)s" value="" type="string" /> 59 <param name="%(force_server_param)s" value="" type="string" security="50" />
60 <param name="%(force_port_param)s" value="" type="int" constraint="1;65535" /> 60 <param name="%(force_port_param)s" value="" type="int" constraint="1;65535" security="50" />
61 <param name="NewAccount" label="%(new_account_label)s" type="button" callback_id="registerNewAccount"/> 61 <param name="NewAccount" label="%(new_account_label)s" type="button" callback_id="registerNewAccount"/>
62 <param name="autoconnect" label="%(autoconnect_label)s" value="true" type="bool" security="0" /> 62 <param name="autoconnect" label="%(autoconnect_label)s" value="true" type="bool" security="50" />
63 <param name="autodisconnect" label="%(autodisconnect_label)s" value="false" type="bool" security="0" /> 63 <param name="autodisconnect" label="%(autodisconnect_label)s" value="false" type="bool" security="50" />
64 </category> 64 </category>
65 </individual> 65 </individual>
66 </params> 66 </params>
67 """ % { 67 """ % {
68 'category_general': D_("General"), 68 'category_general': D_("General"),
456 @parm use_default(bool): if True and attr=='value', return default value if not set 456 @parm use_default(bool): if True and attr=='value', return default value if not set
457 else return None if not set 457 else return None if not set
458 @param profile: owner of the param (@ALL@ for everyone) 458 @param profile: owner of the param (@ALL@ for everyone)
459 @return: attribute 459 @return: attribute
460 """ 460 """
461 #FIXME: looks really dirty and buggy, need to be reviewed/refactored 461 # FIXME: looks really dirty and buggy, need to be reviewed/refactored
462 # FIXME: security_limit is not managed here !
462 node = self._getParamNode(name, category) 463 node = self._getParamNode(name, category)
463 if not node: 464 if not node:
464 log.error(_(u"Requested param [%(name)s] in category [%(category)s] doesn't exist !") % {'name': name, 'category': category}) 465 log.error(_(u"Requested param [%(name)s] in category [%(category)s] doesn't exist !") % {'name': name, 'category': category})
465 raise exceptions.NotFound 466 raise exceptions.NotFound
466 467