summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-20 21:39:30 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-20 21:39:30 +0100
commit63cef4c7d641ffddaeabcd768020674e2681ba05 (patch)
tree10b9ee50b927a7673d93db15b896a15a1012f482 /module/Api.py
parentadded ReadWrite lock, render file progress on dashboard (diff)
downloadpyload-63cef4c7d641ffddaeabcd768020674e2681ba05.tar.xz
improved ui, render waiting files
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/module/Api.py b/module/Api.py
index 27d3e8ffe..bfeeff10c 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -21,8 +21,6 @@ from types import MethodType
from remote.apitypes import *
-from utils import bits_set, primary_uid
-
# contains function names mapped to their permissions
# unlisted functions are for admins only
perm_map = {}
@@ -36,7 +34,6 @@ def RequirePerm(bits):
return _Dec
-
urlmatcher = re.compile(r"((https?|ftps?|xdcc|sftp):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+\-=\\\.&]*)", re.IGNORECASE)
stateMap = {
@@ -52,10 +49,6 @@ stateMap[DownloadState.Unfinished] = frozenset(stateMap[DownloadState.All].diffe
def state_string(state):
return ",".join(str(x) for x in stateMap[state])
-
-def has_permission(userPermission, Permission):
- return bits_set(Permission, userPermission)
-
from datatypes.User import User
class Api(Iface):
@@ -85,7 +78,7 @@ class Api(Iface):
@property
def primaryUID(self):
- return primary_uid(self.user)
+ return self.user.primary if self.user else None
@classmethod
def initComponents(cls):