From 81d22eb73017d0e2fff528708e16f63a883dd56c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 27 Apr 2011 15:39:49 +0100 Subject: [PATCH] When parsing the auth file, if an old format is found(with no auth levels), make sure that the `localclient` always has the ADMIN permission as he should. --- deluge/core/authmanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/core/authmanager.py b/deluge/core/authmanager.py index 23c662cf4..3ec723b43 100644 --- a/deluge/core/authmanager.py +++ b/deluge/core/authmanager.py @@ -267,7 +267,10 @@ class AuthManager(component.Component): log.warning("Your auth entry for %s contains no auth level, " "using AUTH_LEVEL_DEFAULT(%s)..", username, AUTH_LEVEL_DEFAULT) - authlevel = AUTH_LEVEL_DEFAULT + if username == 'localclient': + authlevel = AUTH_LEVEL_ADMIN + else: + authlevel = AUTH_LEVEL_DEFAULT # This is probably an old auth file save_and_reload = True elif len(lsplit) == 3: