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

This commit is contained in:
Aditya Toshniwal authored and GitHub committed 2023-05-03 10:34:39 +05:30
1 parent b2864add54
commit 52829d6f31
1 file changed
+5 -1
@@ -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(