FormState:setRedirect() should check access to the route

Created on 15 April 2015, almost 10 years ago
Updated 3 August 2023, over 1 year ago

Problem/Motivation

FormState::setRedirect() takes a route name, params, and options, and FormState::setRedirectUrl() takes a Url object.
At this point we have enough information to check access to that route.

Proposed resolution

Throw an exception if access is denied, instead of redirecting the user to a 403

Remaining tasks

Decide what exception class to use.

User interface changes

N/A

API changes

FormState::setRedirect()/setRedirectUrl() will throw an exception instead of allowing the user to be redirected to a 403

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Form 

Last updated 23 minutes ago

Created by

🇺🇸United States tim.plunkett Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024