Skip to content

Commit eada954

Browse files
committed
sql: use has_system_privilege instead of has_admin_role in view def
This patch uses the recently added has_system_privilege to check a privilege rather then requiring the broadly scoped admin role. Release note: None
1 parent 221c3df commit eada954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sql/crdb_internal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9182,7 +9182,7 @@ var crdbInternalLogicalReplicationResolvedView = virtualSchemaView{
91829182
SELECT
91839183
j.id AS job_id, jsonb_array_elements(crdb_internal.pb_to_json('progress', i.value)->'LogicalReplication'->'checkpoint'->'resolvedSpans') AS s
91849184
FROM system.jobs j LEFT JOIN system.job_info i ON j.id = i.job_id AND i.info_key = 'legacy_progress'
9185-
WHERE j.job_type = 'LOGICAL REPLICATION' AND pg_has_role(current_user, 'admin', 'member')
9185+
WHERE j.job_type = 'LOGICAL REPLICATION' AND has_system_privilege(current_user, 'REPLICATION')
91869186
) SELECT
91879187
job_id,
91889188
crdb_internal.pretty_key(decode(s->'span'->>'key', 'base64'), 0) AS start_key,

0 commit comments

Comments
 (0)