Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing modlog filtering to allow admins and mods to filter by mod. #2629

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

dessalines
Copy link
Member

Description

Fixes modlog filtering to allow filtering by mods or admins.

Screenshots

Screenshot_20240723_141114_Via

Comment on lines +910 to +912
{(this.amAdminOrMod ||
!this.isoData.site_res.site_view.local_site
.hide_modlog_mod_names) && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, this will allow anyone who is a mod of a community to filter by mod even when looking at actions for communities they aren't a mod of.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be okay, check the this.amModOrAdmin function.

Copy link
Member

@SleeplessOne1917 SleeplessOne1917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. The only potential inconvenience I can see is that a mod will have to be looking at the modlog for a specific community (as opposed to the whole site's modlog) if they want to filter by moderator. It's not a big enough deal to hold up this PR though.

@SleeplessOne1917 SleeplessOne1917 enabled auto-merge (squash) July 23, 2024 20:22
@SleeplessOne1917 SleeplessOne1917 merged commit 81dc9a2 into main Jul 23, 2024
2 checks passed
@dessalines
Copy link
Member Author

Eventually when I add canMod LemmyNet/lemmy#4365 , that should help with this.

@SleeplessOne1917 SleeplessOne1917 deleted the fix_modlog_filtering branch October 2, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sure modlog Filter by user filters not just by the target person, but also the mod_person_id
2 participants