diff --git a/docs/en_US/release_notes_6_21.rst b/docs/en_US/release_notes_6_21.rst index fd2b57bad..efe569bcd 100644 --- a/docs/en_US/release_notes_6_21.rst +++ b/docs/en_US/release_notes_6_21.rst @@ -31,6 +31,7 @@ Housekeeping Bug fixes ********* + | `Issue #5269 `_ - Ensure that the schema diff tool should pick up the change in the column grants. | `Issue #5685 `_ - Ensure that Grant column permission to a view is visible in the SQL tab. | `Issue #5758 `_ - Fixed an issue where lock layout menu was not in sync with preferences. | `Issue #5764 `_ - Fix an issue where the maintenance dialog for Materialized View gives an error. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py index c1f40d688..abe02d083 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/schema_diff_utils.py @@ -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: