Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Make showing NSFW content and blurring it separately configurable #379

Closed happy-river closed 3 years ago

happy-river commented 3 years ago

Address #354 by adding new admin site configuration options to control how NSFW content is shown to anonymous users, and for the initial NSFW preference for new users. Change the User Preferences page to give users three choices for how they want NSFW content presented: normally visible, hidden, or blurred.

For users who had "Show NSFW content" turned off in their preferences, #353 made that content appear, but be blurred out. Applying this update will reverse that change so NSFW content for those users will now be hidden. I could have written the database migration to preserve the behavior from #353, but since the change is so recent I decided to make it optional for site admins by leaving it out of the migration and instead adding a command line command to do it.

Site admins may run:

./throat.py user set-nsfw-hidden-to-blur

to adjust user preferences for those users who had the old 'Show NSFW content' turned off to set them to the new 'Blur until clicked' option.

Site admins may also run:

./throat.py user set-pref-all --name nsfw --value 1
./throat.py user set-pref-all --name nsfw_blur --value 1

to change the preferences of all users to show NSFW content with blur, regardless of their previous setting.