Merge pull request #479 from simhnna/patch-1

Do not show other databases if session is locked
This commit is contained in:
Dan Sosedoff
2020-07-29 21:20:09 -05:00
committed by GitHub

View File

@@ -285,6 +285,10 @@ func ExplainQuery(c *gin.Context) {
// GetDatabases renders a list of all databases on the server
func GetDatabases(c *gin.Context) {
if command.Opts.LockSession {
serveResult(c, []string{}, nil)
return
}
conn := DB(c)
if conn.External {
errorResponse(c, 403, errNotPermitted)