Merge pull request #2663 from coreos-inc/multi-instance-su-panel

Disable debug logs in superuser panel when under multiple instances
This commit is contained in:
josephschorr 2017-07-19 17:28:05 -04:00 committed by GitHub
commit b8e5a21736
3 changed files with 40 additions and 17 deletions

View file

@ -3,6 +3,7 @@ import json
import logging
import os
import string
import socket
import pathvalidate
@ -101,6 +102,7 @@ class SuperUserGetLogsForService(ApiResource):
abort(400)
return {
'instance': socket.gethostname(),
'logs': '\n'.join(logs)
}
@ -121,6 +123,7 @@ class SuperUserSystemLogServices(ApiResource):
""" List the system logs for the current system. """
if SuperUserPermission().can():
return {
'instance': socket.gethostname(),
'services': list(get_services())
}