Post Edits report

Hi,

Most of the time when I check the post edits report, I am interested to know when someone has edited someone else’s post. That seems like the most likely place for abuse of privileges. Is there a good way to check this subset of post edits? If not, I think it would be a small improvement to have this as the default or as an optional view.

3 Likes

Seems like a good query candidate for the #plugin:data-explorer.

4 Likes

Yea, that would work too. It seems a little bit more intuitive to me to have it built into the post edits report on the Moderation tab, as that keeps this potential area for abuse more visible and prominent, but either way would be nice.

1 Like

I tend to agree this should be the default. Seeing a list of self edits is … considerably less than useful @zogstrip

2 Likes

Yes, my bad. I didn’t realize we had a “Post Edits Report” (so many of them now :open_mouth:).

@nbianca can you change the query of that report so we don’t show the edits made by the author of the post?

Also I think I see a 20 limit there, is that hard coded for a reason?

2 Likes

If it helps this is the query I used but I am not sure it gets everything

SELECT
    p.id AS post_id,
    u2.username, 
    topic_id
FROM posts p
    JOIN users u
        ON u.id = p.user_id
    JOIN topics t
        ON t.id = p.topic_id
    JOIN users u2
        ON u2.id = p.last_editor_id
WHERE (p.last_editor_id > 1 AND p.last_editor_id <> p.user_id)
    AND p.self_edits > 0
    AND p.deleted_at IS NULL
    AND u2.trust_level > 2
    AND u2.moderator = false
    AND u2.admin = false
    AND t.deleted_at IS NULL
    AND t.archetype = 'regular'
ORDER BY p.updated_at DESC
LIMIT 500

Note that this rules out users who are staff as well as the system user, so basically the above query is just TL3 users editing around the site to tidy things up.

You could use this query as is @outofthebox in Data Explorer in the meantime…

3 Likes

I’m so encouraged by this update - thank you for improving this report!

@codinghorror, thank you for the Data Explorer query. That helped me quickly identify the edits with the greatest risk for abuse over the past few months. Thankfully, it was nice to see that all the ones I checked had been made to improve our community.

2 Likes

I have removed the self edits from the Post Edits report:

https://github.com/discourse/discourse/pull/7510

6 Likes