discourse/spec
Osama Sayegh e2cd1da26d
FIX: All admins should be allowed to see deleted PM posts regardless of their mod status (#30206)
Admins and moderators can see a user's deleted posts via the `/u/:username/deleted-posts` route. Admins can always see any post on the site, but that's not always the case for moderators, e.g., they can't see all PMs. So, this route accounts for that and excludes posts that a moderator wouldn't be allowed to see if they were not deleted.

However, there's currently a problem with that logic where admins who also have moderation privileges, are treated the same way as moderators and prevented from seeing posts that pure moderators can't see. This commit fixes that problem and only applies the permission checks to moderators who don't have admin privileges.

Internal topic: t/143107.
2024-12-23 12:48:03 +03:00
..
fabricators DEV: Fix specs for directory items controller (#30160) 2024-12-10 08:55:29 -07:00
fixtures DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers UX: add color-scheme meta tag to _head (#30245) 2024-12-13 08:10:08 -03:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration SECURITY: When enabled only allow Discourse Connect logins 2024-12-19 13:13:23 -03:00
integrity DEV: Add spec to ensure app works with multiple tagged loggers 2024-08-13 18:10:03 +02:00
jobs FIX: we introduced a Jobs::UserEmail which broke consistency checks (#30409) 2024-12-22 21:33:47 +11:00
lib DEV: API to register custom request rate limiting conditions (#30239) 2024-12-23 09:57:18 +08:00
mailers UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
migrations DEV: update fa6 icons to drop fa prefix (#30100) 2024-12-05 10:00:41 +08:00
models DEV: return full name in /notifications.json (#30335) 2024-12-20 11:43:13 -05:00
multisite DEV: API to register custom request rate limiting conditions (#30239) 2024-12-23 09:57:18 +08:00
requests FIX: All admins should be allowed to see deleted PM posts regardless of their mod status (#30206) 2024-12-23 12:48:03 +03:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers FIX: more... should not show when there are no visible links (#30405) 2024-12-21 01:06:46 +01:00
services UX: Improve error when trying to edit globally shadowed setting (#30092) 2024-12-04 13:41:32 +10:00
support DEV: Display better output when inspecting service steps 2024-12-12 15:21:10 +01:00
system DEV: Cleanup todos from codebase (#30394) 2024-12-19 18:22:33 -08:00
tasks DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Remove backtrace warning (#30093) 2024-12-04 14:14:36 +10:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00