From fb3bbea027fe25fa7afe33809b9d075685aa4bcc Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 21 Apr 2015 09:51:30 -0400 Subject: [PATCH] Add recv_disconnect to acl allowed methods --- awx/main/management/commands/run_socketio_service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/management/commands/run_socketio_service.py b/awx/main/management/commands/run_socketio_service.py index 3454c2658b..dd037aed0e 100644 --- a/awx/main/management/commands/run_socketio_service.py +++ b/awx/main/management/commands/run_socketio_service.py @@ -29,7 +29,7 @@ valid_sockets = [] class TowerBaseNamespace(BaseNamespace): def get_allowed_methods(self): - return [] + return ['recv_disconnect'] def get_initial_acl(self): global valid_sockets @@ -99,7 +99,8 @@ class AdHocCommandEventNamespace(TowerBaseNamespace): class ScheduleNamespace(TowerBaseNamespace): def get_allowed_methods(self): - return ["schedule_changed"] + parent_allowed = super(ScheduleNamespace, self).get_allowed_methods() + return parent_allowed + ["schedule_changed"] def recv_connect(self): logger.info("Received client connect for schedule namespace from %s" % str(self.environ['REMOTE_ADDR']))