mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show hidden posts to staff members. (#11171)
When looking at the list of a user's deleted posts, those that are also hidden are not listed. Context: https://meta.discourse.org/t/flagged-deleted-posts-do-not-show-up-on-users-profile/168527
This commit is contained in:
parent
0f38fc42e2
commit
5ae82c0492
@ -1,16 +1,22 @@
|
|||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { propertyEqual } from "discourse/lib/computed";
|
import { propertyEqual } from "discourse/lib/computed";
|
||||||
|
import { computed } from "@ember/object";
|
||||||
import { actionDescription } from "discourse/widgets/post-small-action";
|
import { actionDescription } from "discourse/widgets/post-small-action";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [
|
classNameBindings: [
|
||||||
":user-stream-item",
|
":user-stream-item",
|
||||||
":item", // DEPRECATED: 'item' class
|
":item", // DEPRECATED: 'item' class
|
||||||
"item.hidden",
|
"hidden",
|
||||||
"item.deleted:deleted",
|
"item.deleted:deleted",
|
||||||
"moderatorAction",
|
"moderatorAction",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
hidden: computed("item.hidden", function () {
|
||||||
|
return (
|
||||||
|
this.get("item.hidden") && !(this.currentUser && this.currentUser.staff)
|
||||||
|
);
|
||||||
|
}),
|
||||||
moderatorAction: propertyEqual(
|
moderatorAction: propertyEqual(
|
||||||
"item.post_type",
|
"item.post_type",
|
||||||
"site.post_types.moderator_action"
|
"site.post_types.moderator_action"
|
||||||
|
Loading…
Reference in New Issue
Block a user