Skip to content

Commit

Permalink
Add check for bbf_role_admin
Browse files Browse the repository at this point in the history
Signed-off-by: ANJU BHARTI <[email protected]>
  • Loading branch information
ANJU BHARTI committed Dec 23, 2024
1 parent 53e8c63 commit 891e2d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/backend/utils/adt/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5081,9 +5081,10 @@ roles_is_member_of(Oid roleid, enum RoleRecurseType type,

/*
* Need not to iterate through all the members
* if admin_role is found.
* if roleid is bbf_role_admin and admin_role is found.
*/
if (sql_dialect == SQL_DIALECT_TSQL)
if (sql_dialect == SQL_DIALECT_TSQL &&
get_bbf_admin_oid_hook && roleid == (*get_bbf_admin_oid_hook)())
{
return NULL;
}
Expand Down

0 comments on commit 891e2d1

Please sign in to comment.