mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-26 02:30:21 -06:00
Ensure that the schema diff tool should pick up the change in the column grants. #5269
This commit is contained in:
parent
0fd1e0963e
commit
f623d563b1
@ -31,6 +31,7 @@ Housekeeping
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #5269 <https://github.com/pgadmin-org/pgadmin4/issues/5269>`_ - Ensure that the schema diff tool should pick up the change in the column grants.
|
||||
| `Issue #5685 <https://github.com/pgadmin-org/pgadmin4/issues/5685>`_ - Ensure that Grant column permission to a view is visible in the SQL tab.
|
||||
| `Issue #5758 <https://github.com/pgadmin-org/pgadmin4/issues/5758>`_ - Fixed an issue where lock layout menu was not in sync with preferences.
|
||||
| `Issue #5764 <https://github.com/pgadmin-org/pgadmin4/issues/5764>`_ - Fix an issue where the maintenance dialog for Materialized View gives an error.
|
||||
|
@ -176,6 +176,20 @@ class SchemaDiffTableCompare(SchemaDiffObjectCompare):
|
||||
source['attnum'] = tmp['attnum']
|
||||
|
||||
if tmp and source != tmp:
|
||||
# check column level grants
|
||||
acl_dict = dict()
|
||||
if 'attacl' in source and 'attacl' in tmp and \
|
||||
source['attacl'] != tmp['attacl']:
|
||||
if len(source['attacl']) > 0 and len(tmp['attacl']) < 1:
|
||||
acl_dict['added'] = source['attacl'].copy()
|
||||
source['attacl'] = acl_dict
|
||||
elif len(source['attacl']) < 1 and len(tmp['attacl']) > 0:
|
||||
acl_dict['deleted'] = tmp['attacl'].copy()
|
||||
source['attacl'] = acl_dict
|
||||
else:
|
||||
acl_dict['changed'] = source['attacl'].copy()
|
||||
source['attacl'] = acl_dict
|
||||
|
||||
updated.append(source)
|
||||
target_cols.remove(tmp)
|
||||
elif tmp and source == tmp:
|
||||
|
Loading…
Reference in New Issue
Block a user