No admin by username, no Swagger in production, no exception text to clients

S14 and the privacy items of P0:
- signing up as "admin" no longer grants admin; `PrivaPub admin promote
  <root>` (and `demote`) does, run on the box against the configured
  database;
- Swagger is served in Development only;
- every service and controller answers "Something went wrong." where it
  used to send ex.Message, and the SMTP warnings no longer log the
  recipient's address;
- sign-up and login no longer log the IP, User-Agent and root id together;
- invitation sign-up takes the persona's own AvatarUserName (and optional
  AvatarName) instead of naming the avatar after the private login, and
  refuses a persona username equal to the login's. Invitation login uses
  the named persona, creating it if it is new;
- recovery mail comes from "PrivaPub", not collAnon's support address name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-01 10:58:39 +02:00
1 parent 2eb2a63f1e
commit 0f85030744
11 files changed
+144 -76

No files matched your search

+7 -7
View File
@@ -69,7 +69,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(GetGroup)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -90,7 +90,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(GetGroups)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -135,7 +135,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(InsertGroup)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -171,7 +171,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(UpdateGroup)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -211,7 +211,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(JoinGroup)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -237,7 +237,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(LeaveGroup)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}
@@ -279,7 +279,7 @@ namespace PrivaPub.Services
catch (Exception ex)
{
_logger.LogError(ex, $"{nameof(GroupUsersService)}.{nameof(ApproveMember)}");
return result.Invalidate(_localizer["Error: {0}", ex.Message], exception: ex);
return result.Invalidate(_localizer["Something went wrong."], exception: ex);
}
}