feat: 管理端板块管理与旧版数据导入,补充部署运营文档
- 新增管理端板块管理页面与后端接口(admin_board) - 新增旧版数据导入:legacyimport 服务、导入面板、importusers 命令行工具 - 聊天用户卡片、板块图标等 UI 组件与界面优化 - 补充 about/公告/1Panel 部署等文档 - gitignore 排除 dist/ 构建产物与 .agents/ 本地工具目录
This commit is contained in:
@@ -28,6 +28,7 @@ type Handlers struct {
|
||||
Points *service.PointsService
|
||||
Setting *service.SettingService
|
||||
AdminUser *service.AdminUserService
|
||||
LegacyImport *service.LegacyImportService
|
||||
Moderation *service.ModerationService
|
||||
Chat *service.ChatService
|
||||
Telemetry *service.TelemetryService
|
||||
@@ -37,11 +38,14 @@ type Handlers struct {
|
||||
}
|
||||
|
||||
// resolvePublishStatus 决定新帖/新评的初始状态:
|
||||
// staff 直发;若开启「已过审免审」且用户已有 published 内容则直发;否则进 pending。
|
||||
// staff 直发;全站免审开启时所有人直发;否则若开启「已过审免审」且用户已有 published 内容则直发;否则进 pending。
|
||||
func (h *Handlers) resolvePublishStatus(userID uint, role string) string {
|
||||
if model.IsStaff(model.Role(role)) {
|
||||
return model.ContentStatusPublished
|
||||
}
|
||||
if withoutReview, err := h.Setting.PublishWithoutReview(); err == nil && withoutReview {
|
||||
return model.ContentStatusPublished
|
||||
}
|
||||
trust, err := h.Setting.TrustReviewedPublish()
|
||||
if err != nil || !trust {
|
||||
return model.ContentStatusPending
|
||||
|
||||
Reference in New Issue
Block a user