# Incorrect Log entry - Export entity, user\_archive

**URL:** <https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861>\
**Category:** UX\
**Created:** [October 6, 2018, 12:07am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861 "2018-10-06T00:07:36Z")\
**Posts on this page:** 10\
**Page:** 1

## AI-generated summary

A user, [Biscuit](/t/-/98861/1), reported an incorrect log entry labeling a non-staff user as "Staff User" during an "export entity" action with subject "user_archive". This caused concern that a non-staff member might have gained elevated permissions. [codinghorror](/t/-/98861/2) clarified that any user can export their own posts via their user page — a feature since Discourse 1.1 — and the log’s "Staff User" label is misleading. [Biscuit](/t/-/98861/3) confirmed the confusion stemmed from the label and the unclear term "user_archive". [codinghorror](/t/-/98861/4) suggested the issue may lie in logging code added by [techAPJ](/t/-/98861/4), though [techAPJ](/t/-/98861/5) credited [vinothkannans](/t/-/98861/5) for the original implementation. [codinghorror](/t/-/98861/7) acknowledged the mislabeling. [Mittineague](/t/-/98861/8) proposed changing the log column header "Staff User" to simply "User", noting that non-staff actions (like username changes) are already logged. [jomaxro](/t/-/98861/9) agreed. [techAPJ](/t/-/98861/10) confirmed the fix was implemented, changing the label to "User" in [this commit](https://github.com/discourse/discourse/commit/2a94bf9dfb84e8fbd1aeaa5f3aa8dc34cf90e0d8).

<div class="post-metadata">

**Author:** ![Biscuit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/biscuit/32/94482_2.png) [@Biscuit](https://meta.discourse.org/u/Biscuit)\
**Post date:** [October 6, 2018, 12:07am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/1 "2018-10-06T00:07:36Z")

</div>

We have a log entry for:

> **Staff User:** [Users Name]  
> **Action:** export entity  
> **Subject:** user\_archive

The user listed is not actually a staff member, so the log is incorrect in that regard. It’s a new user who just signed up.

Also, what specific user action triggers that log entry as I haven’t seen it before?

---

<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:** [October 6, 2018, 5:11am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/2 "2018-10-06T05:11:46Z")

</div>

What’s weird about it? Any user can export all their posts / topics directly from their user page. This has existed as a default option for users since Discourse 1.1 as I recall.. try it yourself.

---

<div class="post-metadata">

**Author:** ![Biscuit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/biscuit/32/94482_2.png) [@Biscuit](https://meta.discourse.org/u/Biscuit)\
**Post date:** [October 6, 2018, 5:53am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/3 "2018-10-06T05:53:22Z")

</div>

Hey Jeff, the weird part is that the discourse logs list the user as being “staff user”, when they’re not staff. This concerned me as I thought some user had somehow gained staff rights, like admin or mod. I wondered if we had been hacked. But it looks like Discourse is just incorrectly describing the user as staff.

And because I saw the subject “user archive” and didn’t know exactly what that refers to, I was concerned that someone with staff-level rights had exported the forums full user list. Hense my question about what that log entry references.

That’s all. LOL.

---

<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:** [October 6, 2018, 5:56am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/4 "2018-10-06T05:56:00Z")

</div>

I see. This may be @techapj’s bug? We added logging to exports and this might be in that code path.

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [October 6, 2018, 5:59am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/5 "2018-10-06T05:59:05Z")

</div>

This feature was actually added by @vinothkannans in:

[https://github.com/discourse/discourse/commit/9281b72308c7844396d41d67d61305b93d148236](https://github.com/discourse/discourse/commit/9281b72308c7844396d41d67d61305b93d148236)

---

<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:** [October 6, 2018, 5:59am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/7 "2018-10-06T05:59:32Z")

</div>

Ah yes my bad @vinothkannans probably your bug. Not all exports are staff…

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [October 6, 2018, 6:20am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/8 "2018-10-06T06:20:29Z")

</div>

I don’t know as I would call it a bug instead of outdated UI - unless there are plans to have a non-staff logs page.

To me there is no confusion between `user_list` and `user_archive`. What is incorrect is the left column head text - “Staff User”. I think the easy fix would be to simply change that (and the filter label) to “User”.

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [October 6, 2018, 7:53am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/9 "2018-10-06T07:53:13Z")

</div>

Agree with @Mittineague here. We log other non-staff actions like username changes. A header change seems simplest.

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [October 6, 2018, 8:26am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/10 "2018-10-06T08:26:14Z")

</div>

> [@Mittineague](#):
>
> I think the easy fix would be to simply change that (and the filter label) to “User”.

Done via:

[https://github.com/discourse/discourse/commit/2a94bf9dfb84e8fbd1aeaa5f3aa8dc34cf90e0d8](https://github.com/discourse/discourse/commit/2a94bf9dfb84e8fbd1aeaa5f3aa8dc34cf90e0d8)

---

<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:** [October 6, 2018, 8:31am UTC](https://meta.discourse.org/t/incorrect-log-entry-export-entity-user-archive/98861/11 "2018-10-06T08:31:34Z")

</div>

Closed on October 6, 2018, 8:31am UTC


