mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Show the ACL summary on the properties panel for databases.
This commit is contained in:
parent
2b6c8dff0b
commit
62537429d1
@ -227,6 +227,9 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
|||||||
id: 'datowner', label:'{{ _('Owner') }}',
|
id: 'datowner', label:'{{ _('Owner') }}',
|
||||||
editable: false, type: 'text', node: 'role',
|
editable: false, type: 'text', node: 'role',
|
||||||
control: Backform.NodeListByNameControl
|
control: Backform.NodeListByNameControl
|
||||||
|
},{
|
||||||
|
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
|
||||||
|
mode: ['properties'], disabled: true
|
||||||
},{
|
},{
|
||||||
id: 'comments', label:'{{ _('Comment') }}',
|
id: 'comments', label:'{{ _('Comment') }}',
|
||||||
editable: false, type: 'multiline'
|
editable: false, type: 'multiline'
|
||||||
|
@ -4,7 +4,8 @@ SELECT
|
|||||||
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
||||||
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
||||||
current_setting('default_tablespace') AS default_tablespace,
|
current_setting('default_tablespace') AS default_tablespace,
|
||||||
descr.description as comments
|
descr.description as comments,
|
||||||
|
datacl AS acl
|
||||||
FROM pg_database db
|
FROM pg_database db
|
||||||
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
||||||
LEFT OUTER JOIN pg_shdescription descr ON (
|
LEFT OUTER JOIN pg_shdescription descr ON (
|
||||||
|
@ -4,8 +4,9 @@ SELECT
|
|||||||
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
||||||
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
||||||
current_setting('default_tablespace') AS default_tablespace,
|
current_setting('default_tablespace') AS default_tablespace,
|
||||||
descr.description as comments
|
descr.description as comments,
|
||||||
,(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels
|
(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
|
||||||
|
datacl AS acl
|
||||||
FROM pg_database db
|
FROM pg_database db
|
||||||
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
||||||
LEFT OUTER JOIN pg_shdescription descr ON (
|
LEFT OUTER JOIN pg_shdescription descr ON (
|
||||||
|
@ -4,8 +4,9 @@ SELECT
|
|||||||
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
|
||||||
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
has_database_privilege(db.oid, 'CREATE') as cancreate,
|
||||||
current_setting('default_tablespace') AS default_tablespace,
|
current_setting('default_tablespace') AS default_tablespace,
|
||||||
descr.description as comments
|
descr.description as comments,
|
||||||
,(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels
|
(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
|
||||||
|
datacl AS acl
|
||||||
FROM pg_database db
|
FROM pg_database db
|
||||||
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
|
||||||
LEFT OUTER JOIN pg_shdescription descr ON (
|
LEFT OUTER JOIN pg_shdescription descr ON (
|
||||||
|
Loading…
Reference in New Issue
Block a user