mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -06:00
Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription. Fixes #6448
This commit is contained in:
parent
5768ade198
commit
b2205fc6e1
@ -18,4 +18,5 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #6369 <https://redmine.postgresql.org/issues/6369>`_ - Fixed CSRF errors for stale sessions by increasing the session expiration time for desktop mode.
|
| `Issue #6369 <https://redmine.postgresql.org/issues/6369>`_ - Fixed CSRF errors for stale sessions by increasing the session expiration time for desktop mode.
|
||||||
|
| `Issue #6448 <https://redmine.postgresql.org/issues/6448>`_ - Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription.
|
||||||
| `Issue #6580 <https://redmine.postgresql.org/issues/6580>`_ - Fixed TypeError 'NoneType' object is not sub scriptable.
|
| `Issue #6580 <https://redmine.postgresql.org/issues/6580>`_ - Fixed TypeError 'NoneType' object is not sub scriptable.
|
||||||
|
@ -98,8 +98,12 @@ class SearchObjectsHelper:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if obj_type == 'all':
|
if obj_type == 'all':
|
||||||
status, error = conn.execute_dict('select * from pg_subscription')
|
status, result = conn.execute_dict(
|
||||||
if 'permission denied' in error:
|
"SELECT COUNT(1) FROM information_schema.table_privileges "
|
||||||
|
"WHERE table_name = 'pg_subscription' "
|
||||||
|
"AND privilege_type = 'SELECT'")
|
||||||
|
if 'count' in result['rows'][0] and \
|
||||||
|
result['rows'][0]['count'] == '0':
|
||||||
skip_obj_type.append('subscription')
|
skip_obj_type.append('subscription')
|
||||||
|
|
||||||
return skip_obj_type
|
return skip_obj_type
|
||||||
|
Loading…
Reference in New Issue
Block a user