Add a can_mod
field to CommentView
, PostView
to help with moderation abilities.
#4365
Open
4 tasks done
Labels
Milestone
Requirements
Is your proposal related to a problem?
Lemmy's moderation abilities are based on a top down hierarchy: a list of admins, then mods. No one can do mod-related actions on someone higher than them in the hierarchy.
Unfortunately for UIs, this means that every place where moderation is possible, must pass:
person_id
person_id
This is cumbersome and potentially a performance hit, since some threads have thousands of comments, and these lists and logic must be performed repeatedly in the front ends.
IE the logic of whether you
can_mod
something, is duplicated across front and back ends.Describe the solution you'd like.
can_mod
field to every moddable item:PostView
,CommentView
, and a few others.This should be possible with postgres.
One other complication: occasionally you
can_mod
your own content, but that should already be taken care of bycreator == myId
andcreator_is_mod
in the front ends.Describe alternatives you've considered.
N/A
Additional context
See LemmyNet/jerboa#1323 (comment)
The text was updated successfully, but these errors were encountered: