Merge pull request #479 from simhnna/patch-1
Do not show other databases if session is locked
This commit is contained in:
commit
3d14d42356
@ -285,6 +285,10 @@ func ExplainQuery(c *gin.Context) {
|
|||||||
|
|
||||||
// GetDatabases renders a list of all databases on the server
|
// GetDatabases renders a list of all databases on the server
|
||||||
func GetDatabases(c *gin.Context) {
|
func GetDatabases(c *gin.Context) {
|
||||||
|
if command.Opts.LockSession {
|
||||||
|
serveResult(c, []string{}, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
conn := DB(c)
|
conn := DB(c)
|
||||||
if conn.External {
|
if conn.External {
|
||||||
errorResponse(c, 403, errNotPermitted)
|
errorResponse(c, 403, errNotPermitted)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user