Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: workspace owner/dba should be able to list all databases with admin privileges (#3704)
Danny Xu786467781c56
diff --git a/server/database.go b/server/database.goindex c9a329cc85..b43fdad4c5 100644--- a/server/database.go+++ b/server/database.go@@ -54,14 +54,9 @@ func (s *Server) registerDatabaseRoutes(g *echo.Group) {var filteredList []*api.Databaserole := c.Get(getRoleContextKey()).(api.Role)- // If caller is NOT requesting for a particular project and is NOT requesting for a particular- // instance or the caller is a Developer, then we will only return databases belonging to the+ // If the caller is a developer, we will only return databases belonging to the// project where the caller is a member of.- // Looking from the UI perspective:- // - The database list left sidebar will only return databases related to the caller regardless of the caller's role.- // - The database list on the instance page will return all databases if the caller is Owner or DBA, but will only return- // related databases if the caller is Developer.- if projectIDStr == "" && (databaseFind.InstanceID == nil || role == api.Developer) {+ if role == api.Developer {principalID := c.Get(getPrincipalIDContextKey()).(int)for _, database := range dbList {for _, projectMember := range database.Project.ProjectMemberList {