mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure all object types have a System XXX? property. Fixes #1257
This commit is contained in:
committed by
Akshay Joshi
parent
2b5c90e379
commit
dfb74904ed
@@ -230,6 +230,11 @@ class LanguageView(PGChildNodeView):
|
||||
self.driver = get_driver(PG_DEFAULT_DRIVER)
|
||||
self.manager = self.driver.connection_manager(kwargs['sid'])
|
||||
self.conn = self.manager.connection(did=kwargs['did'])
|
||||
self.datlastsysoid = \
|
||||
self.manager.db_info[kwargs['did']]['datlastsysoid'] \
|
||||
if self.manager.db_info is not None and \
|
||||
kwargs['did'] in self.manager.db_info else 0
|
||||
|
||||
# Set the template path for the SQL scripts
|
||||
self.template_path = (
|
||||
"languages/sql/#gpdb#{0}#".format(self.manager.version) if
|
||||
@@ -348,6 +353,9 @@ class LanguageView(PGChildNodeView):
|
||||
gettext("Could not find the language information.")
|
||||
)
|
||||
|
||||
res['rows'][0]['is_sys_obj'] = (
|
||||
res['rows'][0]['oid'] <= self.datlastsysoid)
|
||||
|
||||
sql = render_template(
|
||||
"/".join([self.template_path, 'acl.sql']),
|
||||
lid=lid
|
||||
|
||||
@@ -129,6 +129,9 @@ define('pgadmin.node.language', [
|
||||
},{
|
||||
id: 'acl', label: gettext('Privileges'), type: 'text',
|
||||
group: gettext('Security'), mode: ['properties'],
|
||||
},{
|
||||
id: 'is_sys_obj', label: gettext('System language?'),
|
||||
cell:'boolean', type: 'switch', mode: ['properties'],
|
||||
},{
|
||||
id: 'description', label: gettext('Comment'), cell: 'string',
|
||||
type: 'multiline',
|
||||
|
||||
Reference in New Issue
Block a user