Attached is a patch which makes views check that a user should have access to the display before rending block contents.
Page displays do this through the menu system, but without this patch views can't provide access control for blocks using this same extensible system.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | views_block_access_check_2.patch | 1.24 KB | jmiccolis |
| views_block_access_check.patch | 1.31 KB | jmiccolis |
Comments
Comment #1
jmiccolis commentedIt looks like my original patch was doing more work that it needed to. Simpler patch attached.
Comment #2
merlinofchaos commentedHmm. $view->access() is already being tested in views_block prior to the execute_display() call there. In general I've preferred keeping access tests external, though for pages they became internal so that we could have multiple displays with the same path and it needed to move into the view for that. I don't see why we should check twice.
Comment #3
jmiccolis commentedYep, I stand corrected. Thanks.