feat: Implement public access for tenant content

- Add TenantOptionalAuth middleware to allow access to public content without requiring authentication.
- Introduce ListPublicPublished and PublicDetail methods in the content service to retrieve publicly accessible content.
- Create tenant_public HTTP routes for listing and showing public content, including preview and main asset retrieval.
- Enhance content tests to cover scenarios for public content access and permissions.
- Update specifications to reflect the new public content access features and rules.
This commit is contained in:
2025-12-22 16:29:44 +08:00
parent 266de2f75e
commit 39454458f1
17 changed files with 1010 additions and 17 deletions

View File

@@ -8,6 +8,8 @@ import (
"quyun/v2/app/errorx"
"quyun/v2/app/http/super"
"quyun/v2/app/http/tenant"
"quyun/v2/app/http/tenant_join"
"quyun/v2/app/http/tenant_public"
"quyun/v2/app/jobs"
"quyun/v2/app/middlewares"
"quyun/v2/app/services"
@@ -53,6 +55,8 @@ func Command() atom.Option {
middlewares.Provide,
super.Provide,
tenant.Provide,
tenant_join.Provide,
tenant_public.Provide,
// {Provider: api.Provide},
// {Provider: web.Provide},
),