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
commit 3d14d42356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)