R6 moderation in decePub: users and personas, accounts, report actions, deletions, suspended personas
Administration's Users & personas (administrators): logins searched and opened into their personas and groups; roles, bans, two-factor reset and deletion of a login; silence, suspension and deletion of a persona; a group deleted. Accounts (moderators): local personas and remote accounts searched or listed as moderated, silenced and suspended with a staff note and a warning. Reports resolve with an action. ActDialog asks for the note, the warning or the password and is the act's confirmation. A login deletes its own persona and the groups it owns with its password. Suspended personas can't be chosen; one refused a token mid-session moves the session to another, or to none, once. Warnings show in notifications, limited accounts on their profile, and moderators remove a post from its card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
This commit is contained in:
1 parent
4c88980374
commit
c572471b88
30 files changed
+2604
-67
No files matched your search
@@ -9,11 +9,12 @@ using PrivaPub.ClientModels.Admin;
|
||||
namespace decePubClient.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// What PrivaPub's moderators and administrators do as the root: reports and the staff's log (/clientapi/moderator),
|
||||
/// What PrivaPub's moderators and administrators read as the root: reports and the staff's log (/clientapi/moderator),
|
||||
/// servers blocked for the whole instance, the federation statistics (the overview, the servers, one server's days and
|
||||
/// events, the ledger's events, the server's own days) and the backups (/clientapi/admin). The server's own settings,
|
||||
/// announcements and relays are InstanceAdminService's. PrivaPub checks the root's role on every call. Lists come back
|
||||
/// empty and values null on failure; nothing throws.
|
||||
/// announcements and relays are InstanceAdminService's; resolving reports and every act on accounts, posts and logins
|
||||
/// are ModerationService's. PrivaPub checks the root's role on every call. Lists come back empty and values null on
|
||||
/// failure; nothing throws.
|
||||
/// </summary>
|
||||
public class AdminService(IHttpService httpService, ILoggingService logger, CoalescingStringLocalizer localizer)
|
||||
{
|
||||
@@ -29,12 +30,6 @@ namespace decePubClient.Services
|
||||
return [];
|
||||
}
|
||||
|
||||
public async Task<WebResult> Resolve(string reportId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var response = await httpService.Post(APIs.ClientApi.POST_M_ResolveReport(reportId), cancellationToken: cancellationToken);
|
||||
return response.IsSuccessStatusCode ? new WebResult() : await response.Content.ReadWebResult(response.StatusCode, localizer, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>One page of the staff's log, newest first: those before `before` (the previous page's Next) when given.
|
||||
/// Administrators read all of it with login names; a moderator reads what isn't about a login. Null on failure.</summary>
|
||||
public async Task<ViewAdminActionsPage> Log(string before, int limit, CancellationToken cancellationToken = default)
|
||||
|
||||
Reference in new issue
Block a user