rogee 39454458f1 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.
2025-12-22 16:29:44 +08:00
2025-12-15 17:55:32 +08:00
2025-12-17 16:11:30 +08:00
2025-12-16 22:40:31 +08:00
2025-12-15 17:55:32 +08:00
2025-12-16 17:59:53 +08:00
2025-12-15 17:55:32 +08:00
2025-12-17 09:32:05 +08:00
2025-12-15 17:55:32 +08:00

QuyUn v2(多租户版本)

实现约定以 specs/ 为准:

  • 路由前缀:/t/:tenant_code/...(API:/t/:tenant_code/v1;Admin:/t/:tenant_code/admin;User:/t/:tenant_code/)
  • 数据库:见 specs/DB.sql(后端迁移:backend/database/migrations/00001_init_multi_tenant.sql)

开发(后端)

在 backend/:

  • 启动依赖:docker compose up -d postgres redis
  • 运行迁移:env GOCACHE=$PWD/.gocache GOTMPDIR=$PWD/.gotmp go run . migrate up
  • 启动服务:env GOCACHE=$PWD/.gocache GOTMPDIR=$PWD/.gotmp go run . serve

注意:当前 API 仅做了路由骨架(大部分返回 501),用于前后端联调与路由/租户前缀验证。

开发(前端)

  • Admin:frontend/admin/
  • User:frontend/user/
  • Super Admin:frontend/superadmin/(访问:/super/;API:/super/v1)
    • 角色类型管理:/super/v1/roles
    • 租户统计:/super/v1/statistics、/super/v1/tenants

两端均会从 location.pathname 推导 tenant_code,并设置:

  • Admin router base:/t/<tenant_code>/admin/
  • User router base:/t/<tenant_code>/
  • API base:/t/<tenant_code>/v1
S
Description
No description provided
Readme
5 MiB
Languages
Vue 44.7%
Go 37.8%
JavaScript 15.9%
SCSS 0.6%
PLpgSQL 0.5%
Other 0.4%