changeset 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 7f0c8856e4e1
children 2b8a975ff712
files src/memory/params.py src/plugins/plugin_misc_file.py
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/memory/params.py	Sun Nov 22 21:25:09 2015 +0100
+++ b/src/memory/params.py	Mon Nov 23 13:19:42 2015 +0100
@@ -53,14 +53,14 @@
             <param name="%(show_empty_groups)s" label="%(show_empty_groups_label)s" value="true" type="bool" security="0" />
         </category>
         <category name="Connection" label="%(category_connection)s">
-            <param name="JabberID" value="name@example.org" type="string" security="0" />
-            <param name="Password" value="" type="password" />
-            <param name="Priority" value="50" type="int" constraint="-128;127"/>
-            <param name="%(force_server_param)s" value="" type="string" />
-            <param name="%(force_port_param)s" value="" type="int" constraint="1;65535" />
+            <param name="JabberID" value="name@example.org" type="string" security="10" />
+            <param name="Password" value="" type="password" security="10" />
+            <param name="Priority" value="50" type="int" constraint="-128;127" security="10" />
+            <param name="%(force_server_param)s" value="" type="string" security="50" />
+            <param name="%(force_port_param)s" value="" type="int" constraint="1;65535" security="50" />
             <param name="NewAccount" label="%(new_account_label)s" type="button" callback_id="registerNewAccount"/>
-            <param name="autoconnect" label="%(autoconnect_label)s" value="true" type="bool" security="0" />
-            <param name="autodisconnect" label="%(autodisconnect_label)s" value="false"  type="bool" security="0" />
+            <param name="autoconnect" label="%(autoconnect_label)s" value="true" type="bool" security="50" />
+            <param name="autodisconnect" label="%(autodisconnect_label)s" value="false"  type="bool" security="50" />
         </category>
     </individual>
     </params>
@@ -458,7 +458,8 @@
         @param profile: owner of the param (@ALL@ for everyone)
         @return: attribute
         """
-        #FIXME: looks really dirty and buggy, need to be reviewed/refactored
+        # FIXME: looks really dirty and buggy, need to be reviewed/refactored
+        # FIXME: security_limit is not managed here !
         node = self._getParamNode(name, category)
         if not node:
             log.error(_(u"Requested param [%(name)s] in category [%(category)s] doesn't exist !") % {'name': name, 'category': category})
--- a/src/plugins/plugin_misc_file.py	Sun Nov 22 21:25:09 2015 +0100
+++ b/src/plugins/plugin_misc_file.py	Mon Nov 23 13:19:42 2015 +0100
@@ -47,7 +47,7 @@
 CONFIRM_TITLE = D_(u'Confirm file transfer')
 CONFIRM_OVERWRITE = D_(u'File {} already exists, are you sure you want to overwrite ?')
 CONFIRM_OVERWRITE_TITLE = D_(u'File exists')
-SECURITY_LIMIT = 10
+SECURITY_LIMIT = 30
 
 PROGRESS_ID_KEY = 'progress_id'