Forum: a service of its own and the /forum pages
services/forum (axum, port 8083) on the same database and login, in the forum schema (migration 0038, which also adds the moderator role): nicknames, profiles with shared signs, topics, threads with listening or advice intent, two-level replies, read marks and followed threads, reactions as ratings with points and ranks, newcomer limits (lifted by a purchase), moderation with reasons, bans and a log. Integration tests run in CI. The frontend's /forum pages (light by default, dark on request, phone first with a desktop layout) are switched on by FORUM_URL; the /api/v1 proxy sends /api/v1/forum/* to the forum service. Concept and status: docs/kozosseg.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -36,6 +36,8 @@ pub enum Role {
|
||||
Admin,
|
||||
/// May write articles (phase 2).
|
||||
Creator,
|
||||
/// Forum moderator, appointed by an admin.
|
||||
Moderator,
|
||||
/// Paid tier: may use the models marked `@premium`.
|
||||
Premium,
|
||||
/// Top tier: may use the `@vip` and `@premium` models.
|
||||
@@ -44,12 +46,13 @@ pub enum Role {
|
||||
}
|
||||
|
||||
impl Role {
|
||||
pub const ALL: [Role; 5] = [Role::Admin, Role::Creator, Role::Premium, Role::Vip, Role::User];
|
||||
pub const ALL: [Role; 6] = [Role::Admin, Role::Creator, Role::Moderator, Role::Premium, Role::Vip, Role::User];
|
||||
|
||||
pub fn as_str(self) -> &'static str {
|
||||
match self {
|
||||
Role::Admin => "admin",
|
||||
Role::Creator => "creator",
|
||||
Role::Moderator => "moderator",
|
||||
Role::Premium => "premium",
|
||||
Role::Vip => "vip",
|
||||
Role::User => "user",
|
||||
|
||||
Reference in New Issue
Block a user