def _processClientActions(self):
log.debug("Processing Client Actions...")
while self.clientActions:
session, action = self.clientActions.pop(0)
servername = action['server'][0]
role, handler = self.actionHandlers.get(action['action'][0], (None, None))
if handler:
if self.authRequired:
if role in self.authUsers[session.username].servers.get(servername):
reactor.callWhenRunning(handler, session, action)
else:
self.http._addUpdate(servername = servername, sessid = session.uid, action = "RequestError", message = "You do not have permission to execute this action.")
else:
reactor.callWhenRunning(handler, session, action)
else:
log.error("ClientActionHandler for action %s does not exixts..." % action['action'][0])
评论列表
文章目录