Overview
Allow admins to disable a collection's Public setting so that it doesn't show up on the Reader.
Background
Originally requested on the forum:
It would be useful from an anti-spam/moderation point of view to be able to disable certain users/blogs from appearing on the /read page.
Users
Admins
Implementation
On the admin page of individual users, perhaps on the "Visibility" row for each collection a user owns, add a button that performs this action. Example button text:
- Mute
- Disable Public setting
- Block from Reader
When clicked, this should POST to a new admin endpoint like /admin/collections/mute, which will run two queries:
// Flag the collection as muted _, err = t.Exec("INSERT INTO collectionattributes (collection_id, attribute, value) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE value = 1", id, "muted", "1") // Change the collection's visibility setting to Unlisted _, err = t.Exec("UPDATE collections SET private = 0 WHERE id = ?", id)
Next, the edit collection page should check for this collectionattribute and, if present, visibly disable the Public option. It should also check for this value when updating a collection and changing the visibility to Public, blocking the change if the value is present.