Damus
Random Penguin profile picture
Random Penguin
@Random Penguin
In the new theme I'm working on I've implemented an option to show a blue checkmark in posts for local accounts that have been self-verified. I was considering expanding the usefulness of that by having it show some other icon/color for Moderators and Administrators on that server, but when I looked into how to figure out who a Moderator is I learned there is no way to distinguish a Moderator from an Admin because there is no actual Moderator role in Friendia.

In UserSession.php the isModerator() function references the same function in User.php which says: /**
* Returns if the given uid is valid and a moderator
*
* @param int $uid
*
* @return bool
* @throws Exception
*/
public static function isModerator(int $uid): bool
{
// @todo Replace with a moderator check in the future
return self::isSiteAdmin($uid);
}

So it seems there is no actual "Moderator" role, just "Administrator." And isSiteAdmin() just checks the user's email against getAdminEmailList() which, in turn, just gets the list of email addresses from the "admin_email" line of the site config file?

Is that "todo" slated to happen in the next release? Is Friendica going to have that actual "Moderator" role added so moderation can be delegated to people who are not also Admins? I assume it would be implemented similarly to the Admin Emails in the site config with similar functions for checking users against that list, and of course, anyone with Admin privileges would automatically also be a Moderator.

Still, this almost feels like something that should be part of the "Delegation" feature so someone with "Admin" privileges could just designate some other user as a "Moderator" without also granting them control of the admin account or giving them admin privileges. Since the "Moderation" screens are separate from the "Admin" ones anyway.

@Friendica Developers

2
Michael 🇺🇦 · 39w
nostr:nprofile1qyt8wumn8ghj7un9d3shjtnyd968gmewwp6kytcqyzg3xad9mz47u0rcycvesxsfdnxxv2hlz5sversp2r5cynpmv08cupdrtkp I would like to have a separated "Moderator" role, but the sad truth is that I guess that I don't have the capacity to add it. There are a lot of things that would be nice to see them b...
Kevin · 15w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqjyfhtfwc40hrc7pxrxvp5ztve3nz4lc4yrxguq2saxpycwmre78q6m9q72 Weird. Just seeing this now so no changes were done by me. Lol