Fix an issue in View SQL when column level privileges are set with multiple roles. #6189

This commit is contained in:
Aditya Toshniwal 2023-05-03 10:34:39 +05:30 committed by GitHub
parent b2864add54
commit 52829d6f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1382,10 +1382,14 @@ class ViewNode(PGChildNodeView, VacuumSettings, SchemaDiffObjectCompare):
'acl' in self.allowed_acls['datacl']:
allowed_acls = self.allowed_acls['datacl']['acl']
deftypes = set()
for row in acl['rows']:
priv = parse_priv_from_db(row)
res.setdefault(row['deftype'], []).append(priv)
res[row['deftype']] = \
deftypes.add(row['deftype'])
for deftype in deftypes:
res[deftype] = \
parse_priv_to_db(res[row['deftype']], allowed_acls)
grant_sql = render_template("/".join(