After the assassination, the mandate of the Secret Service was altered to include protection of presidential candidates

The convicted assassin, 24-year-old Palestinian Sirhan Bishara Sirhan is widely thought to have been acting alone. Sirhan attributed the killing to Kennedy’s support for Israel during and after the Six-Day War, although there is no record of RFK supporting Israel during that period. On March 3, 1969, in a Los Angeles, California court, Sirhan admitted that he had killed Kennedy

Wikipedia
RFK Assassination