mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Only allow expanding hidden posts for author and staff (#21052)
This commit is contained in:
@@ -497,7 +497,10 @@ createWidget("post-contents", {
|
||||
|
||||
result = result.concat(applyDecorators(this, "after-cooked", attrs, state));
|
||||
|
||||
if (attrs.cooked_hidden) {
|
||||
if (
|
||||
attrs.cooked_hidden &&
|
||||
(this.currentUser?.isLeader || attrs.user_id === this.currentUser?.id)
|
||||
) {
|
||||
result.push(this.attach("expand-hidden", attrs));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user