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:
13
backend/app/http/tenant_join/dto/join.go
Normal file
13
backend/app/http/tenant_join/dto/join.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package dto
|
||||
|
||||
// JoinByInviteForm 用户通过邀请码加入租户的请求参数。
|
||||
type JoinByInviteForm struct {
|
||||
// InviteCode 邀请码:由租户管理员生成;用户提交后加入对应租户。
|
||||
InviteCode string `json:"invite_code"`
|
||||
}
|
||||
|
||||
// JoinRequestCreateForm 用户提交加入租户申请的请求参数(无邀请码场景)。
|
||||
type JoinRequestCreateForm struct {
|
||||
// Reason 申请原因(可选):用于向租户管理员说明申请加入的目的。
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
Reference in New Issue
Block a user