0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-policy/config
Alan Guo Xiang Tan e8669040d1 SECURITY: Validate policy permissions on post save
The `create_policy_allowed_groups` setting controls who can create
policies, but it only gates the composer UI and the
`post_process_cooked` event handler. It does not prevent unauthorized
users from injecting `[policy]` markup directly into post raw — for
example, by editing a wiki post.

Add `DiscoursePolicy::PostValidator` as an ActiveRecord validation on
`Post`. When policies are added, removed, or modified, both the post
owner and the acting user must belong to `create_policy_allowed_groups`
or the save is rejected. Policies inside blockquotes are ignored.
2026-03-19 15:46:24 +00:00
..
locales SECURITY: Validate policy permissions on post save 2026-03-19 15:46:24 +00:00
routes.rb DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
settings.yml DEV: Convert policy_restrict_to_staff_posts to group based access (#36157) 2025-12-02 09:50:18 +08:00