From af6f0e882f9d533dcb0271c1afbc7210532363b4 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 30 Sep 2011 15:57:17 +0200 Subject: little GUI and API fixes --- module/Api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/Api.py') 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 -- cgit v1.2.3