This commit is contained in:
2026-04-25 11:59:10 +08:00
parent e246271a24
commit ba463ae38d
33 changed files with 1600 additions and 112 deletions

View File

@@ -0,0 +1,16 @@
package product
import "context"
// SelfSubscribePolicy 是否允许用户在控制台自助发起「订阅产品」
type SelfSubscribePolicy interface {
Allow(ctx context.Context, userID string) (allowed bool, message string, err error)
}
// DefaultAllowSelfSubscribe 未装配下属模块时:恒允许
type DefaultAllowSelfSubscribe struct{}
// Allow 恒允许
func (DefaultAllowSelfSubscribe) Allow(_ context.Context, _ string) (bool, string, error) {
return true, "", nil
}