Use has_privs_of_role instead of is_member_of_role in UserHasPermissionToViewStatsOf

As of 6198420ad8,
the usage of is_member_of_role is replaced by has_privs_of_role for pg_stat_activity,
pg_stat_statements and many others.
fix-priv-checks-for-stats
Onur Tirtir 2025-03-05 20:52:56 +03:00
parent ea7aa6712d
commit bfd80982dd
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ UserHasPermissionToViewStatsOf(Oid currentUserId, Oid backendOwnedId)
return true;
}
if (is_member_of_role(currentUserId,
if (has_privs_of_role(currentUserId,
ROLE_PG_READ_ALL_STATS))
{
return true;