Rollbacks grantor changes

pull/7451/head
gurkanindibay 2024-02-01 16:26:07 +03:00
parent b8e915ce74
commit 21e9381d23
2 changed files with 3 additions and 10 deletions

View File

@ -901,15 +901,7 @@ GenerateGrantRoleStmtsOfRole(Oid roleid)
granteeRole->rolename = GetUserNameFromId(membership->member, true);
grantRoleStmt->grantee_roles = list_make1(granteeRole);
RoleSpec *grantorRole = makeNode(RoleSpec);
grantorRole->roletype = ROLESPEC_CSTRING;
grantorRole->location = -1;
grantorRole->rolename = GetUserNameFromId(membership->grantor, true);
grantRoleStmt->grantor = grantorRole;
/*log grantor */
/*elog(ERROR, "grantor: %s", grantorRole->rolename); */
grantRoleStmt->grantor = NULL;
#if PG_VERSION_NUM >= PG_VERSION_16

View File

@ -224,7 +224,8 @@ SET citus.enable_create_role_propagation TO ON;
SET ROLE dist_role_1;
GRANT non_dist_role_1 TO non_dist_role_2;
SET citus.enable_create_role_propagation TO OFF;
GRANT dist_role_1 TO dist_role_2 granted by postgres;
SET ROLE non_dist_role_1;
GRANT dist_role_1 TO dist_role_2;
RESET ROLE;
SET citus.enable_create_role_propagation TO ON;
GRANT dist_role_3 TO non_dist_role_3;