okfn/ckanext-datahub — pull request #14 by rossjones (2013-08-27 21:19:51+00:00)
Title: Temporarily adds a quick acess delete spam button on search results.

Until we have other measures for handling spam, this will add (for sysadmins) a quick access delete button to each item in the search results. This should make it a lot quicker to delete spam.

I expect it is of limited value once the spam handling is done properly, but havingquick-access buttons on the search results seems generally useful.

The pylons context (c) doesn't seem to be available in the template, and we can't pass a username to is_sysadmin so have had to start our own lib/helpers.py. Don't want to check_access on each search result as I don't think sysadmin checks are in the fast path :(