# Hide flag actions for current user when they're flagged or the flagger

**URL:** https://meta.discourse.org/t/hide-flag-actions-for-current-user-when-theyre-flagged-or-the-flagger/198202
**Category:** Development
**Created:** [July 25, 2021, 4:21pm UTC](https://meta.discourse.org/t/hide-flag-actions-for-current-user-when-theyre-flagged-or-the-flagger/198202 "2021-07-25T16:21:06Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [July 26, 2021, 1:52pm UTC](https://meta.discourse.org/t/hide-flag-actions-for-current-user-when-theyre-flagged-or-the-flagger/198202/4 "2021-07-26T13:52:35Z")

</div>

From a quick look at the relevant code in core, you’ll need extend the `canPerform` property (which determines if the agree/disagree etc. buttons should be shown) in `reviewable-item` with your additional logic:

> <https://github.com/discourse/discourse/blob/e1d2b67178619b83a8d2662800f4171057f91306/app/assets/javascripts/discourse/app/templates/components/reviewable-item.hbs#L57>

> <https://github.com/discourse/discourse/blob/e1d2b67178619b83a8d2662800f4171057f91306/app/assets/javascripts/discourse/app/components/reviewable-item.js#L69>

If you’ve never done something like this before, then the [Developing Discourse Themes & Theme Components](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648) would be a great place to get started! It covers how you can modify a core class which is what you need to do. Existing themes/components are a great resource that you can learn from as well, see the [discourse-extra-group-classes](https://github.com/discourse/discourse-extra-group-classes) component which uses the same technique that you’ll need to use (in particular the `initialize-extra-group-classes.js.es6` file).

P.S. going to move these posts out of this topic since they’re not directly related to themes settings.

---

_[View the full topic](https://meta.discourse.org/t/hide-flag-actions-for-current-user-when-theyre-flagged-or-the-flagger/198202)._
