|
|
@ -205,6 +205,19 @@ def get_admin( request, server ): |
|
|
|
data[fld] = getattr( srv, fld ) |
|
|
|
return { 'data': data, 'success': True } |
|
|
|
|
|
|
|
@login_required |
|
|
|
@EXT_DIRECT_PROVIDER.register_method( "Mumble" ) |
|
|
|
def log( request, server, start, limit ): |
|
|
|
""" Retrieve log messages. """ |
|
|
|
srv = get_object_or_404( Mumble, id=int(server) ) |
|
|
|
if not srv.isUserAdmin( request.user ): |
|
|
|
raise Exception( "Access denied" ) |
|
|
|
return { 'data': [ |
|
|
|
{ 'timestamp': ent.timestamp, 'txt': ent.txt } |
|
|
|
for ent in srv.ctl.getLog( srv.srvid, start, (start + limit) ) |
|
|
|
], 'success': True } |
|
|
|
|
|
|
|
|
|
|
|
@login_required |
|
|
|
@EXT_DIRECT_PROVIDER.register_method( "Mumble" ) |
|
|
|
def users( request, server ): |
|
|
|