diff --git a/htdocs/js/usereditor.js b/htdocs/js/usereditor.js index 2228426..3bdaf85 100644 --- a/htdocs/js/usereditor.js +++ b/htdocs/js/usereditor.js @@ -100,6 +100,7 @@ Ext.ux.UserEditorPanel = function( config ){ } }, { text: gettext("Save"), + scope: this, handler : function(){ var data = []; for( i = 0; i < userAdminStore.data.items.length; i++ ){ @@ -108,7 +109,7 @@ Ext.ux.UserEditorPanel = function( config ){ data.push(rec.data); } } - MumbleUserAdmin.update( data, function(provider, response){ + MumbleUserAdmin.update( this.server, data, function(provider, response){ if( response.result.success ){ for( i = 0; i < userAdminStore.data.items.length; i++ ){ rec = userAdminStore.data.items[i]; diff --git a/pyweb/mumble/views.py b/pyweb/mumble/views.py index ccdf5c0..f5f153d 100644 --- a/pyweb/mumble/views.py +++ b/pyweb/mumble/views.py @@ -261,7 +261,8 @@ def djangousers( request ): return users @EXT_DIRECT_PROVIDER.register_method( "MumbleUserAdmin" ) -def update( request, data ): +def update( request, server, data ): + srv = get_object_or_404( Mumble, id=int(server) ) for record in data: if record['id'] == -1: if record['delete']: