diff options
| author | Hunternif | 2025-02-16 01:27:21 +0000 |
|---|---|---|
| committer | Hunternif | 2025-02-16 01:27:21 +0000 |
| commit | a859d448b2573bab7990521aa4dcb823ba576801 (patch) | |
| tree | 451bfd74d6001afd6e7179c7d52a5bb30b8452ab /server/szurubooru/api/post_api.py | |
| parent | 760fce7d2834a240781a55df9d96afb0e45fac3d (diff) | |
| parent | fb763ada0fb5027f29f003f7dc3261c6b87f30a7 (diff) | |
Merge branch 'priv-view-unsafe-posts' into hunternif
Diffstat (limited to 'server/szurubooru/api/post_api.py')
| -rw-r--r-- | server/szurubooru/api/post_api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/szurubooru/api/post_api.py b/server/szurubooru/api/post_api.py index 4a629fe..4e89f54 100644 --- a/server/szurubooru/api/post_api.py +++ b/server/szurubooru/api/post_api.py @@ -117,6 +117,8 @@ def create_snapshots_for_post( def get_post(ctx: rest.Context, params: Dict[str, str]) -> rest.Response: auth.verify_privilege(ctx.user, "posts:view") post = _get_post(params) + if post.safety == model.Post.SAFETY_UNSAFE: + auth.verify_privilege(ctx.user, "posts:view:unsafe") return _serialize_post(ctx, post) |