From 891e2d1ba20193e05b41b45cb0bbaaa18ae26a2e Mon Sep 17 00:00:00 2001 From: ANJU BHARTI Date: Mon, 23 Dec 2024 08:48:42 +0000 Subject: [PATCH] Add check for bbf_role_admin Signed-off-by: ANJU BHARTI --- src/backend/utils/adt/acl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 4c01cf1dc84..6938ea07970 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -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; }