diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-30 15:57:17 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-30 15:57:17 +0200 |
commit | af6f0e882f9d533dcb0271c1afbc7210532363b4 (patch) | |
tree | a0e5756077d3c9383a55f7cc2f48f20688b045bd /module/Api.py | |
parent | fixed name clash in C# (diff) | |
download | pyload-af6f0e882f9d533dcb0271c1afbc7210532363b4.tar.xz |
little GUI and API fixes
Diffstat (limited to 'module/Api.py')
-rw-r--r-- | module/Api.py | 6 |
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 |