16 lines
615 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package host
import (
"context"
"hyapp/pkg/appcode"
hostservice "hyapp/services/user-service/internal/service/host"
)
// roleRegionMatchRequired 只控制 Agency 角色邀请、Host 主动申请和 BD 邀请的区域匹配。
// App 差异由统一策略注册表解析Agency 主动邀请 Host、币商列表和子币商关系不得复用该例外。
func roleRegionMatchRequired(ctx context.Context) bool {
policy, err := hostservice.ResolveRoleScopePolicy(appcode.FromContext(ctx), hostservice.RoleScopeSceneOrganizationExpansion)
return err != nil || policy.BaseScope != hostservice.RoleScopeGlobal
}