Closed (fixed)
Project:
Flag
Version:
8.x-4.x-dev
Component:
Flag core
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2015 at 12:54 UTC
Updated:
19 Oct 2015 at 21:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
martin107 commentedHere is the initial version
A natural consequence of this is that we can also remove the $action parameter from
AJAXLinkController::generateResponse()
Comment #3
joachim commentedThis will probably need a reroll due to #2568129: Move lazy builder callback into a service..
Also, I figured #2488856: add a wrapper around buildLink() that checks access should probably get done first. I maybe linked these two issues the wrong way round...
And I have also been wondering whether we should retain the method that doesn't check anything -- just in case there are use cases I've not envisaged. So we'd have:
getLink(): main API: does all the things for you: checks access, figures out $action. Wraps around:
renderLink(), which lets you hang yourself if you really want to.
Possible use case: you want a token in an email that you're sending out, and you want it to be a specific action, which might not be the right one at the time you're sending the email.
Comment #4
joachim commentedHmm also renderLink() is probably not the right name -- if it returns a render array, it's a builder, not a renderer.
Comment #5
joachim commentedComment #8
joachim commentedWhoops.
Comment #10
martin107 commentedHere is what I checked.
a) The idea behind the issue is sound.
b) The change has been made in all the appropriate places.
c) I cant see any negative consequences... down the line.
I have supplied patches here so this is just a +1 form me.
Comment #11
joachim commentedI think that's good enough! Thanks!
Committed.
Comment #13
martin107 commentedsorry fixed a typo in #10
I CAN NOT see any negative consequences...