Problem/Motivation
When accessing the feed listing page when you only may view feeds of certain types, the following errors are displayed:
Notice: Undefined index: title in template_preprocess_links() (line 690 of core/includes/theme.inc).
Notice: Undefined index: title in template_preprocess_links() (line 746 of core/includes/theme.inc).
This is because FeedListBuilder does not check if the current user may edit feeds.
Additionally, I found two related issues as well:
- The user can view feeds of all types on the listing page, even those he/she isn't supposed to see.
- There's a difference in the permission that is needed to view the feed listing page with or without Views installed.
Proposed resolution
- Set the permission for viewing the feed listing to "access feed overview", just as is the case for the view "feeds_feed".
- In FeedListBuilder, add an access check for viewing feeds.
- In FeedListBuilder, add an access check for updating feeds.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Patch will follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-3028959-4-5.txt | 3.58 KB | megachriz |
| #5 | feeds-feed-list-builder-edit-link-perm-3028959-5.patch | 13.18 KB | megachriz |
| #4 | interdiff-3028959-2-4.txt | 1.92 KB | megachriz |
| #4 | feeds-feed-list-builder-edit-link-perm-3028959-4.patch | 13.23 KB | megachriz |
| #2 | feeds-feed-list-builder-edit-link-perm-3028959-2.patch | 12.9 KB | megachriz |
Comments
Comment #2
megachrizComment #4
megachrizWhen someone has no permission to view a feed, but does have permission to perform an operation on it, only show the feed label and do not display a link to the feed.
Does not work when using Views, though.
Comment #5
megachrizCorrections in code comments and explicit check that the label for a feed is not displayed as a link when an user has no view permission for that feed.
Comment #7
megachrizCommitted #5.