summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-30 15:57:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-30 15:57:17 +0200
commitaf6f0e882f9d533dcb0271c1afbc7210532363b4 (patch)
treea0e5756077d3c9383a55f7cc2f48f20688b045bd /module/Api.py
parentfixed name clash in C# (diff)
downloadpyload-af6f0e882f9d533dcb0271c1afbc7210532363b4.tar.xz
little GUI and API fixes
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/Api.py b/module/Api.py
index f4a252ac9..e3a0dffed 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -838,8 +838,8 @@ class Api(Iface):
return Destination.Queue if d == "queue" else Destination.Collector
for e in events:
- event = Event()
- event.event = e[0]
+ event = EventInfo()
+ event.eventname = e[0]
if e[0] in ("update", "remove", "insert"):
event.id = e[3]
event.type = ElementType.Package if e[2] == "pack" else ElementType.File
@@ -924,7 +924,7 @@ class Api(Iface):
:param userdata: dictionary of user data
:return: boolean
"""
- if userdata["role"] == ROLE.ADMIN or userdata == "local":
+ if userdata == "local" or userdata["role"] == ROLE.ADMIN:
return True
elif func in permMap and has_permission(userdata["permission"], permMap[func]):
return True