Revoke creator execute before ownership transfer
Some checks are pending
CI / lint-and-test (push) Waiting to run

After CREATE FUNCTION, the creator (postgres) has an explicit EXECUTE
entry. ALTER FUNCTION OWNER does not remove it, leaving a stale ACL
that the verification rejects. Revoke from all principals before the
single runtime grant.
This commit is contained in:
fwazb 2026-07-24 12:20:26 -07:00
parent 5c506b6ed1
commit 674985181e

View file

@ -800,8 +800,11 @@ begin
end end
$function$; $function$;
-- Revoke default PUBLIC execute, grant only to runtime, then transfer ownership. -- Strip all ACLs (including default PUBLIC and creator execute), grant only
revoke all on function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb) from public; -- runtime, then transfer ownership. The owner transfer leaves the creator's
-- stale explicit entry if not revoked first.
revoke all on function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb)
from public, leoclean_kb_runtime, leoclean_kb_stage_owner, current_user;
grant execute on function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb) grant execute on function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb)
to leoclean_kb_runtime; to leoclean_kb_runtime;
alter function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb) alter function kb_stage.stage_leoclean_proposal(text, text, text, text, jsonb)