Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privelege to list & view unsafe posts #714

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Hunternif
Copy link
Contributor

@Hunternif Hunternif commented Feb 16, 2025

Use case: I want to show off the awesome szurubooru to my friend, but I don't want them to see my nsfw posts XD

This PR adds 2 privileges:

'posts:list:unsafe':    regular
'posts:view:unsafe':    regular

The view privilege restricts viewing "unsafe" posts via post_api.
The list privilege filters out any "unsafe" posts from your query, for all queries.
Adds unit tests too.

@hujle
Copy link
Contributor

hujle commented Mar 1, 2025

That's a good feature, but I wish it wasn't pinned to unsafe category and could be applied to any of them.

On that note, an extra "hidden" category with these permissions applied to it would be better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants