# Leader cannot unhide flagged post

**URL:** https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118
**Category:** Bug
**Created:** [May 30, 2021, 9:04pm UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118 "2021-05-30T21:04:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [May 30, 2021, 9:04pm UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118/1 "2021-05-30T21:04:47Z")

</div>

Hi,

I noticed this today so I am unsure if it has been like this before.

Basically TL4 (Leader) on the post admin wrench has the option to unhide a flagged post however when a post is flagged and they press ‘Unhide’ it does not work.

### Steps to repro

1. Get another account to post something publicly or in a PM
2. Let anyone flag the post (must be hidden)
3. Ask a user with TL4 **only** to unhide the post

### Expected result:

The flagged post will be restored

### Actual result:

The TL4 user has the option to unhide post but it does not unhide the post when clicked

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/5/9561c2ad5c01985e01f1818f387a10bf188c83a7.png)

I have reproduced this on two Discourse forums on 2.8.0 beta 1

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 30, 2021, 11:31pm UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118/2 "2021-05-30T23:31:46Z")

</div>

I think this might be related to the existing bug we have at the moment where flag counts are showing for TL4 users, but should not be. @Roman are you working on that one?

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [May 31, 2021, 1:04am UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118/3 "2021-05-31T01:04:47Z")

</div>

I already fixed that one, but this seems unrelated. I’ll take a look tomorrow morning.

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [May 31, 2021, 3:43pm UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118/5 "2021-05-31T15:43:49Z")

</div>

It looks like this bug is quite old. According to our `PostGuardian`, only staff members can unhide posts but the client checks if the user is staff or TL4.

I made a PR to hide the button the TL4s:

[https://github.com/discourse/discourse/pull/13211](https://github.com/discourse/discourse/pull/13211)

I assumed this is what we want to do, but I can change the guardian if we prefer to let leaders unhide posts.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 31, 2021, 6:09pm UTC](https://meta.discourse.org/t/leader-cannot-unhide-flagged-post/192118/6 "2021-05-31T18:09:59Z")

</div>


