From ac48ad982ec4923731b9d25dd8fdaea28c6a9042 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 30 Mar 2017 00:36:44 +0100 Subject: [UI] Refactor duplicated code out of connection managers --- deluge/ui/web/auth.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'deluge/ui/web/auth.py') diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py index d80327f57..0a2ad0ac3 100644 --- a/deluge/ui/web/auth.py +++ b/deluge/ui/web/auth.py @@ -18,15 +18,9 @@ from email.utils import formatdate from twisted.internet.task import LoopingCall -log = logging.getLogger(__name__) - +from deluge.common import AUTH_LEVEL_ADMIN, AUTH_LEVEL_NONE -AUTH_LEVEL_NONE = 0 -AUTH_LEVEL_READONLY = 1 -AUTH_LEVEL_NORMAL = 5 -AUTH_LEVEL_ADMIN = 10 - -AUTH_LEVEL_DEFAULT = AUTH_LEVEL_NORMAL +log = logging.getLogger(__name__) class AuthError(Exception): @@ -36,7 +30,7 @@ class AuthError(Exception): """ pass -# Import after as json_api imports the above AuthError and AUTH_LEVEL_DEFAULT +# Import after as json_api imports the above AuthError from deluge.ui.web.json_api import export, JSONComponent # NOQA, isort:skip pylint: disable=wrong-import-position -- cgit