mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-03 04:00:55 -06:00
Fixed an issue where the REVOKE statement in the create script was throwing an error if the role contained special characters. #7737
This commit is contained in:
parent
c6e7ce03cc
commit
2e878a3fb2
@ -701,10 +701,13 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings):
|
||||
data['relacl'] = parse_priv_to_db(data['relacl'], self.acl)
|
||||
|
||||
if 'acl' in data:
|
||||
driver = get_driver(PG_DEFAULT_DRIVER)
|
||||
data.update({'revoke_all': []})
|
||||
for acl in data['acl']:
|
||||
if len(acl['privileges']) > 0 and len(acl['privileges']) < 7:
|
||||
data['revoke_all'].append(acl['grantee'])
|
||||
data['revoke_all'].append(
|
||||
driver.qtIdent(None, acl['grantee'])
|
||||
if acl['grantee'] != 'PUBLIC' else 'PUBLIC')
|
||||
|
||||
# if table is partitions then
|
||||
if 'relispartition' in data and data['relispartition']:
|
||||
|
Loading…
Reference in New Issue
Block a user