Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is a kernel-patch follow-up.
drupal_access_denied() is now a trivial wrapper around throwing Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException. Let's eliminate the middle man.
All instances of drupal_access_denied() should be replaced with throwing the appropriate exception, or else refactored so that the "denied" logic happens further up in the routing layer where it belongs.
Comment | File | Size | Author |
---|---|---|---|
#19 | core-replace_drupal_access_denied-1591604-17.patch | 10.97 KB | underq |
#17 | core_replace_drupal_access_denied-1591604-17.patch | 11.17 KB | Anonymous (not verified) |
#15 | core_replace_drupal_access_denied-1591604-15.patch | 8.63 KB | Anonymous (not verified) |
#12 | 1591604-12-core-replace_drupal_access_denied.patch | 12.31 KB | pfrenssen |
#8 | core-replace_drupal_access_denied-1591604-8.patch | 6.73 KB | Albert Volkman |
Comments
Comment #1
Crell CreditAttribution: Crell commentedComment #2
catchComment #3
Crell CreditAttribution: Crell commentedThis should be fairly routine.
Comment #4
underq CreditAttribution: underq commentedPatch done, need review ;-)
Comment #6
underq CreditAttribution: underq commentedAdd
use SymfonyComponentHttpKernelExceptionAccessDeniedHttpException;
/code>Comment #8
Albert Volkman CreditAttribution: Albert Volkman commentedRe-roll.
Comment #9
aspilicious CreditAttribution: aspilicious commentedComment #10
pfrenssenThe are mentions of drupal_access_denied() scattered across the documentation, please update these too.
For example, in the documentation for drupal_deliver_page():
Comment #11
pfrenssenI'll do this, have done the same in #1587850: Replace drupal_not_found() with throw NotFoundHttpException. The patches in these two issues will give conflicts anyway since they are affecting the same lines of documentation.
Comment #12
pfrenssenDid the following updates to the patch in #8:
Comment #13
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedAwesome! And also: Yay! #1587850: Replace drupal_not_found() with throw NotFoundHttpException is in.
#12: 1591604-12-core-replace_drupal_access_denied.patch queued for re-testing.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedI've rebased pfrenssen's patch on the latest head, should hopefully test OK now.
Comment #16
aspilicious CreditAttribution: aspilicious commentedYou forgot to remove the drupal_access_denied() function
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedSorry, that was the point after all!
There were also some other changes missing. This should cover includes/common.inc, includes/file.inc and modules/aggregator/aggregator.admin.inc, and in the process removing the function.
Comment #18
aspilicious CreditAttribution: aspilicious commentedDid a grep, is rtbc if this come back green!
Comment #19
underq CreditAttribution: underq commentedRebased chrisdolby patch with remove drupal_access_denied(), edit file_download() comment and add AccessDeniedHttpException() in aggregator_admin_refresh_feed() function.
I hope that's good.
Comment #20
underq CreditAttribution: underq commentedOups you are so fast :)
Comment #21
aspilicious CreditAttribution: aspilicious commentedThey both are correct, but the patch command they use was different, thats why there is a size change. Btw you can't access the first patch anymore because they used the same name while crossposting, so the second one overwrites the first one.
Comment #22
tim.plunkettNo, one was core_replace and the other core-replace.
The first patch changes the file permissions which is wrong. The second one (#19) is RTBC.
Comment #23
aspilicious CreditAttribution: aspilicious commentedWoow timplunkett, I didn't notice the subtle permission change in the git headers.
Thank you!
Comment #24
Dries CreditAttribution: Dries commentedGreat. Love the clean-ups. Committed to 8.x. Thanks!
Comment #25
David_Rothstein CreditAttribution: David_Rothstein commentedThis and several other issues look like they weren't actually committed/pushed. So, #19 is still RTBC.
Comment #26
Dries CreditAttribution: Dries commentedCommitted now: http://drupalcode.org/project/drupal.git/commit/002769e
Comment #27
David_Rothstein CreditAttribution: David_Rothstein commentedFor anyone who's looking for it, a change notification for this issue was started at http://drupal.org/node/1616360