fix: 二次迁移名额有剩余次数即展示入口,不依赖强制拦截
EOF Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -709,9 +709,10 @@ def gate_for_user(*, club_id: str, user_uid: str, roles: Optional[List[str]] = N
|
||||
if roles:
|
||||
role_hit = any(r in force_roles for r in roles)
|
||||
has_assets = user_has_migratable_assets(plan, user_uid)
|
||||
# 白名单角色下完全无资产:不强制、不展示入口
|
||||
# 强制:仍要有可迁资产(空资产别拦死首页)
|
||||
# 入口:只要还有剩余次数就展示(含二次名额),不必依赖第一次强制拦截
|
||||
force = bool(plan.force_intercept and role_hit and not done and has_assets)
|
||||
show_entry = bool(has_assets and not done)
|
||||
show_entry = bool(not done)
|
||||
return {
|
||||
'active': True,
|
||||
'force': force,
|
||||
|
||||
Reference in New Issue
Block a user