From 1bf2176870ca88ad87622186581e2424f66260e6 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Thu, 12 Nov 2009 13:55:40 +0100 Subject: [PATCH] add resync button to the 'users' view. see #55 --- pyweb/mumble/views.py | 3 +++ template/mumble/mumble.htm | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/pyweb/mumble/views.py b/pyweb/mumble/views.py index 4ef034d..2f3350f 100644 --- a/pyweb/mumble/views.py +++ b/pyweb/mumble/views.py @@ -201,6 +201,9 @@ def users( request, server ): srv = get_object_or_404( Mumble, id=int(server) ); + if "resync" in request.GET and request.GET['resync'] == "true": + srv.readUsersFromMurmur(); + if not srv.isUserAdmin( request.user ): return HttpResponse( simplejson.dumps({ 'success': False, 'objects': [], 'errormsg': 'Access denied' }), diff --git a/template/mumble/mumble.htm b/template/mumble/mumble.htm index a64957f..51ac0be 100644 --- a/template/mumble/mumble.htm +++ b/template/mumble/mumble.htm @@ -301,6 +301,13 @@ }, } ); } + }, { + text: '{% trans "Resync with Murmur" %}', + handler: function(){ + userAdminStore.reload({ + params: { 'resync': 'true' }, + }); + }, }], plugins: [ adminColumn, deleteColumn ], },