mirror of https://github.com/citusdata/citus.git
Fixes grantor on role metadata sync
parent
542212c3d8
commit
34b8914c69
|
@ -901,7 +901,14 @@ GenerateGrantRoleStmtsOfRole(Oid roleid)
|
||||||
granteeRole->rolename = GetUserNameFromId(membership->member, true);
|
granteeRole->rolename = GetUserNameFromId(membership->member, true);
|
||||||
grantRoleStmt->grantee_roles = list_make1(granteeRole);
|
grantRoleStmt->grantee_roles = list_make1(granteeRole);
|
||||||
|
|
||||||
grantRoleStmt->grantor = NULL;
|
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);
|
||||||
|
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_16
|
#if PG_VERSION_NUM >= PG_VERSION_16
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,6 @@ AppendGrantRoleStmt(StringInfo buf, GrantRoleStmt *stmt)
|
||||||
appendStringInfo(buf, "%s ", stmt->is_grant ? " TO " : " FROM ");
|
appendStringInfo(buf, "%s ", stmt->is_grant ? " TO " : " FROM ");
|
||||||
AppendRoleList(buf, stmt->grantee_roles);
|
AppendRoleList(buf, stmt->grantee_roles);
|
||||||
AppendGrantWithAdminOption(buf, stmt);
|
AppendGrantWithAdminOption(buf, stmt);
|
||||||
AppendGrantedByInGrantForRoleSpec(buf, stmt->grantor, stmt->is_grant);
|
|
||||||
AppendGrantRestrictAndCascadeForRoleSpec(buf, stmt->behavior, stmt->is_grant);
|
AppendGrantRestrictAndCascadeForRoleSpec(buf, stmt->behavior, stmt->is_grant);
|
||||||
AppendGrantedByInGrantForRoleSpec(buf, stmt->grantor, stmt->is_grant);
|
AppendGrantedByInGrantForRoleSpec(buf, stmt->grantor, stmt->is_grant);
|
||||||
appendStringInfo(buf, ";");
|
appendStringInfo(buf, ";");
|
||||||
|
|
Loading…
Reference in New Issue