[Feature] Add option to disable email verification on registration
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- go, typescript
- Lĩnh vực
- authentication, backend, frontend
Hướng nghiên cứu
Bắt đầu với internal/schema/siteinfo_schema.go và theo dõi luồng đăng ký trong internal/service/content/user_service.go, sau đó kiểm tra internal/controller_admin/siteinfo_controller.go và các component quản trị bên dưới ui/src/admin/pages/site/. Chạy các test đăng ký và thông tin site hiện có nếu có. Công việc được hoàn tất khi setting được cung cấp và lưu bền vững, mặc định yêu cầu verification, thay đổi đúng trạng thái đăng ký và có thể được điều khiển từ admin panel.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Request: Allow admin to disable email verification requirement
Problem
Currently, Apache Answer always requires email verification after registration. Users cannot access the platform until they click the verification link in their email.
This is problematic because:
- Many users don't receive or check the verification email
- It creates friction in user onboarding
- Some deployments (internal networks, dev environments) don't need email verification
Proposed Solution
Add an admin configuration option to allow users to use the platform immediately after registration without email verification.
Technical Changes Required
1. Schema Changes
File: internal/schema/siteinfo_schema.go
type SiteLoginReq struct {
AllowNewRegistrations bool `json:"allow_new_registrations"`
AllowEmailRegistrations bool `json:"allow_email_registrations"`
AllowPasswordLogin bool `json:"allow_password_login"`
AllowEmailDomains []string `json:"allow_email_domains"`
RequireEmailVerification bool `json:"require_email_verification"` // NEW
}
2. Registration Logic
File: internal/service/content/user_service.go
Current behavior (line ~471):
userInfo.MailStatus = entity.EmailStatusToBeVerified // Always unverified
New behavior:
if requireEmailVerification {
userInfo.MailStatus = entity.EmailStatusToBeVerified
} else {
userInfo.MailStatus = entity.EmailStatusAvailable // Verified immediately
}
3. Admin API
File: internal/controller_admin/siteinfo_controller.go
- Update
SiteLoginReqstruct to include new field - Ensure admin can toggle this setting
4. Frontend Admin Panel
File: ui/src/admin/pages/site/ (or similar)
- Add toggle switch for "Require Email Verification" in login settings
Default Behavior
RequireEmailVerification = true(maintain backward compatibility)- Admin can set to
falseto allow immediate access after registration
Database Changes
None required - existing mail_status field already supports both states:
1= EmailStatusAvailable (verified)2= EmailStatusToBeVerified (pending)
Testing Checklist
- New user registration with verification enabled → mail_status = 2
- New user registration with verification disabled → mail_status = 1
- Admin can toggle the setting via admin panel
- API returns correct value for
require_email_verification - Existing users with mail_status = 2 still need to verify (if required)
Related Files
internal/schema/siteinfo_schema.gointernal/service/content/user_service.gointernal/controller_admin/siteinfo_controller.gointernal/service/siteinfo_common/siteinfo_service.goui/src/(admin panel components)
- Ngôn ngữ chính
- Go
- Star
- 15.7k
- Fork
- 1.4k
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/answer
-
List button click not working Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Hardening: cap the invite_user list size in UpdateQuestionInviteUser to bound notification fan-out Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Gravatar hash is computed from the un-lowercased email, so mixed-case accounts render an identicon Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Tất cả issue của apache/answer
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
googleapis/librarian#7670 · 2 bình luận ·