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.

This commit is contained in:
Pedro Algarvio 2011-04-27 15:39:49 +01:00
parent 98a8be7131
commit 81d22eb730
1 changed files with 4 additions and 1 deletions

View File

@ -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: