# Accessing the Admin Panel in the Source Code

**URL:** https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571
**Category:** Development
**Created:** [October 26, 2023, 6:40pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571 "2023-10-26T18:40:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Marshably](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marshably/32/335851_2.png) [@Marshably](https://meta.discourse.org/u/Marshably)
#### Post date: [October 26, 2023, 6:40pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/1 "2023-10-26T18:40:05Z")

</div>

Hi all!

I wonder if anyone can help me locate where the User Info part of the Admin Panel is located in the Discourse Source Code. I need to make an edit to the Source Code that will hide User IP Addresses when a Moderator or Admin views their Profile from the Admin Panel but I have no idea where I can find the code that relates to this.

Any help would be hugely appreciated.

Thank you all in advance!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [October 26, 2023, 6:51pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/2 "2023-10-26T18:51:51Z")

</div>

Hi, welcome! 👋

Do you mean here?

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/0/f/70fa8b4f366e9749304f2fdf3e37646a782378c2.png)

If so, it should be here:  
[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/user-index.hbs#L180-L201](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/user-index.hbs#L180-L201)

---

<div class="post-metadata">

### Author: ![Marshably](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marshably/32/335851_2.png) [@Marshably](https://meta.discourse.org/u/Marshably)
#### Post date: [October 26, 2023, 6:57pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/3 "2023-10-26T18:57:55Z")

</div>

For some reason I still cannot locate it based on what you have given me.

But yes, that is exactly what I meant.

---

<div class="post-metadata">

### Author: ![Marshably](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marshably/32/335851_2.png) [@Marshably](https://meta.discourse.org/u/Marshably)
#### Post date: [October 26, 2023, 8:08pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/4 "2023-10-26T20:08:50Z")

</div>

> [@Arkshine](#):
>
> Hi, welcome! 👋
> 
> Do you mean here?
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/7/0/f/70fa8b4f366e9749304f2fdf3e37646a782378c2.png)
> 
> If so, it should be here:  
> [https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/user-index.hbs#L180-L201](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/templates/user-index.hbs#L180-L201)

I eventually managed to find this, but for some unknown reason, after deleting those lines of Code and restarting the VPS, the IPs still show up?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 26, 2023, 11:17pm UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/5 "2023-10-26T23:17:57Z")

</div>

> [@Marshably](#):
>
> but for some unknown reason, after deleting those lines of Code and restarting the VPS, the IPs still show up

Editing the Discourse source code isn’t the recommended way to make changes to Discourse. I think you are going to have to find a way to make the change in a plugin.

What happened when you restarted Discourse will depend on how you restarted it. If you ran `./launcher rebuild app`, then the changes you made will have been overwritten from the Discourse base image. If you ran `./launcher start app`, it may be that starting the app isn’t enough to get Discourse to recompile the edited handlebars template.

Do you really need to prevent moderators _and_ admins from viewing user’s IP addresses? There are a few requests on this site to add a setting that prevents moderators from viewing IP address. I’m not aware of other sites wanting to prevent admins from viewing IP addresses.

---

<div class="post-metadata">

### Author: ![Marshably](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marshably/32/335851_2.png) [@Marshably](https://meta.discourse.org/u/Marshably)
#### Post date: [October 27, 2023, 6:03am UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/6 "2023-10-27T06:03:09Z")

</div>

> [@simon](#):
>
> Do you really need to prevent moderators _and_ admins from viewing user’s IP addresses? There are a few requests on this site to add a setting that prevents moderators from viewing IP address. I’m not aware of other sites wanting to prevent admins from viewing IP addresses.

I wanted to prevent Moderators from viewing the IP Addresses as my community is not going to become larger than maybe 100 Users and some of them are upset over the fact that IP Addresses are collected (I’ve already explained every website collects their IP and some sell it). So I decided to attempt to remove it completely however that has not yet worked.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 27, 2023, 6:53am UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/7 "2023-10-27T06:53:51Z")

</div>

> [@Marshably](#):
>
> my community is not going to become larger than maybe 100 Users

Instead of trying to hide IP addresses from moderators, maybe you could just use category moderators to handle the site’s moderation. That way only admins would be able to view IP addresses. Details about Category moderation are here:

- [Category Group Review/Moderation](https://meta.discourse.org/t/category-group-review-moderation/116478)
- [Category Moderator Improvements](https://meta.discourse.org/t/category-moderator-improvements/158628)

There’s a feature request about hiding IP addresses from moderators here: [Option to hide IP addresses from moderators](https://meta.discourse.org/t/option-to-hide-ip-addresses-from-moderators/207715).

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 27, 2023, 7:02am UTC](https://meta.discourse.org/t/accessing-the-admin-panel-in-the-source-code/283571/8 "2023-10-27T07:02:59Z")

</div>

> [@Marshably](#):
>
> some of them are upset over the fact that IP Addresses are collected

If there are trust issues between your community and the moderator team then you will need to solve those in a non-technical way, not work around them with technology. These kind of things tend to blow up in another fashion sooner or later.
