mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
PostgreSQL: Show only accessible databases
This commit is contained in:
@@ -291,9 +291,9 @@ if (isset($_GET["pgsql"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_databases() {
|
function get_databases() {
|
||||||
return get_vals("SELECT d.datname FROM pg_database d JOIN pg_roles r ON d.datdba = r.oid
|
return get_vals("SELECT datname FROM pg_database
|
||||||
WHERE d.datallowconn = TRUE AND has_database_privilege(d.datname, 'CONNECT') AND pg_has_role(r.rolname, 'USAGE')
|
WHERE datallowconn = TRUE AND has_database_privilege(datname, 'CONNECT')
|
||||||
ORDER BY d.datname");
|
ORDER BY datname");
|
||||||
}
|
}
|
||||||
|
|
||||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||||
|
@@ -5,6 +5,7 @@ PostgreSQL: Do not alter indexes with expressions
|
|||||||
PostgreSQL: Fix export of indexes with expressions (bug #768)
|
PostgreSQL: Fix export of indexes with expressions (bug #768)
|
||||||
PostgreSQL: Display ENUM types
|
PostgreSQL: Display ENUM types
|
||||||
PostgreSQL: Export ENUM types (bug #587)
|
PostgreSQL: Export ENUM types (bug #587)
|
||||||
|
PostgreSQL: Show accessible databases to non-owners (regression from 4.9.1)
|
||||||
SQLite: Support CHECK constraint
|
SQLite: Support CHECK constraint
|
||||||
SQLite: Add command Check tables
|
SQLite: Add command Check tables
|
||||||
SQLite: Display all rows of variable values
|
SQLite: Display all rows of variable values
|
||||||
|
Reference in New Issue
Block a user