Show the ACL summary on the properties panel for databases.

This commit is contained in:
Dave Page 2016-03-10 16:21:17 +00:00
parent 2b6c8dff0b
commit 62537429d1
4 changed files with 11 additions and 5 deletions

View File

@ -227,6 +227,9 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
id: 'datowner', label:'{{ _('Owner') }}',
editable: false, type: 'text', node: 'role',
control: Backform.NodeListByNameControl
},{
id: 'acl', label: '{{ _('Privileges') }}', type: 'text',
mode: ['properties'], disabled: true
},{
id: 'comments', label:'{{ _('Comment') }}',
editable: false, type: 'multiline'

View File

@ -4,7 +4,8 @@ SELECT
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
has_database_privilege(db.oid, 'CREATE') as cancreate,
current_setting('default_tablespace') AS default_tablespace,
descr.description as comments
descr.description as comments,
datacl AS acl
FROM pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
LEFT OUTER JOIN pg_shdescription descr ON (

View File

@ -4,8 +4,9 @@ SELECT
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
has_database_privilege(db.oid, 'CREATE') as cancreate,
current_setting('default_tablespace') AS default_tablespace,
descr.description as comments
,(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels
descr.description as comments,
(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
datacl AS acl
FROM pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
LEFT OUTER JOIN pg_shdescription descr ON (

View File

@ -4,8 +4,9 @@ SELECT
pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
has_database_privilege(db.oid, 'CREATE') as cancreate,
current_setting('default_tablespace') AS default_tablespace,
descr.description as comments
,(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels
descr.description as comments,
(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
datacl AS acl
FROM pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
LEFT OUTER JOIN pg_shdescription descr ON (