summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-05 23:21:44 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-05 23:21:44 +0100
commit9b12691ad66269ca8b67e80516548e8ae10bd7b2 (patch)
tree6df55bd94d02b216cb2ec51899f0d0e78899d3e2 /module/Api.py
parentfixed position of autocompletion, updated libraries (diff)
downloadpyload-9b12691ad66269ca8b67e80516548e8ae10bd7b2.tar.xz
working search suggestions
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/Api.py b/module/Api.py
index 6ef425d26..577c420c3 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -39,6 +39,7 @@ def RequirePerm(bits):
return _Dec
+# TODO: not needed anymore
# decorator to annotate user methods, these methods must have user=None kwarg.
class UserContext(object):
def __new__(cls, f, *args, **kwargs):
@@ -91,6 +92,10 @@ class Api(Iface):
def user(self):
return None #TODO return default user?
+ @property
+ def userHandle(self):
+ return self.user.primary if self.user is not None else None
+
@classmethod
def initComponents(cls):
# Allow extending the api