mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 15:26:46 -06:00
Fixed an issue where parameters for roles were not visible. #5429
This commit is contained in:
parent
368d71b6ce
commit
16e28bb998
@ -831,6 +831,7 @@ rolmembership:{
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
variables = self.variables(None, None, rid)
|
||||||
if not status:
|
if not status:
|
||||||
return internal_server_error(
|
return internal_server_error(
|
||||||
_(ERROR_FETCHING_ROLE_INFORMATION + "\n{0}").format(res))
|
_(ERROR_FETCHING_ROLE_INFORMATION + "\n{0}").format(res))
|
||||||
@ -842,9 +843,9 @@ rolmembership:{
|
|||||||
res['rows'][0]['is_sys_obj'] = (
|
res['rows'][0]['is_sys_obj'] = (
|
||||||
res['rows'][0]['oid'] <= self._DATABASE_LAST_SYSTEM_OID or
|
res['rows'][0]['oid'] <= self._DATABASE_LAST_SYSTEM_OID or
|
||||||
self.datistemplate)
|
self.datistemplate)
|
||||||
|
res = {**res['rows'][0], 'variables': variables['rows']}
|
||||||
return ajax_response(
|
return ajax_response(
|
||||||
response=res['rows'][0],
|
response=res,
|
||||||
status=200
|
status=200
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1225,8 +1226,8 @@ rolmembership:{
|
|||||||
|
|
||||||
return dependents
|
return dependents
|
||||||
|
|
||||||
@check_precondition()
|
# @check_precondition()
|
||||||
def variables(self, gid, sid, rid):
|
def variables(self, gid, sid, rid, as_json=False):
|
||||||
|
|
||||||
status, rset = self.conn.execute_dict(
|
status, rset = self.conn.execute_dict(
|
||||||
render_template(self.sql_path + 'variables.sql',
|
render_template(self.sql_path + 'variables.sql',
|
||||||
@ -1240,7 +1241,8 @@ rolmembership:{
|
|||||||
"Error retrieving variable information for the role.\n{0}"
|
"Error retrieving variable information for the role.\n{0}"
|
||||||
).format(rset)
|
).format(rset)
|
||||||
)
|
)
|
||||||
|
if not as_json:
|
||||||
|
return rset
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data=rset['rows']
|
data=rset['rows']
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user