summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/auth.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-03-30 00:36:44 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2017-06-07 12:36:09 +0100
commitac48ad982ec4923731b9d25dd8fdaea28c6a9042 (patch)
tree19f4d72f51c1d50381e10ce7212522e585137662 /deluge/ui/web/auth.py
parent54a081bdfd73b046a31b4d960b0f7ad75018d1be (diff)
downloaddeluge-ac48ad982ec4923731b9d25dd8fdaea28c6a9042.tar.gz
deluge-ac48ad982ec4923731b9d25dd8fdaea28c6a9042.tar.bz2
deluge-ac48ad982ec4923731b9d25dd8fdaea28c6a9042.zip
[UI] Refactor duplicated code out of connection managers
Diffstat (limited to 'deluge/ui/web/auth.py')
-rw-r--r--deluge/ui/web/auth.py12
1 files changed, 3 insertions, 9 deletions
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