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
24 lines
1.0 KiB
C#
24 lines
1.0 KiB
C#
namespace decePubClient.Models;
|
|
|
|
/// <summary>
|
|
/// WebResult.ErrorCode values HttpService sets when a request fails before or outside the server, so the UI can tell a
|
|
/// connectivity problem (shown as a warning) from a real error.
|
|
/// </summary>
|
|
public static class FailureCodes
|
|
{
|
|
public const string Cancelled = "CANCELLED";
|
|
public const string DeviceOffline = "DEVICE-OFFLINE";
|
|
public const string Timeout = "TIMEOUT";
|
|
public const string ApiUnreachable = "API-UNREACHABLE";
|
|
public const string RetriesExhausted = "RETRIES-EXHAUSTED";
|
|
public const string ServerError = "SERVER-ERROR";
|
|
public const string ClientError = "CLIENT-ERROR";
|
|
public const string Unauthorized = "UNAUTHORIZED";
|
|
/// <summary>PrivaPub refused the current persona a token while the login's own session is good: the staff suspended it,
|
|
/// or it is gone.</summary>
|
|
public const string PersonaRefused = "PERSONA-REFUSED";
|
|
|
|
public static bool IsConnectivity(string errorCode) =>
|
|
errorCode is DeviceOffline or Timeout or ApiUnreachable or RetriesExhausted;
|
|
}
|