From 63cef4c7d641ffddaeabcd768020674e2681ba05 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 20 Mar 2013 21:39:30 +0100 Subject: improved ui, render waiting files --- module/Api.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'module/Api.py') 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): -- cgit v1.2.3