fix: expose DBN_USER_TIER so plus/pro SSO users can use doc picker
isPaidUser() was checking DBN_FREE_TIER_BALANCE === undefined, which is only true for CaveauAI sessions. SSO users (even plus/pro) always have DBN_FREE_TIER_BALANCE set, so the picker was showing the upgrade modal for everyone in the SSO flow. Now reads DBN_USER_TIER explicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,7 @@ window.DBN_TOOLS_AUTHENTICATED = <?= $layoutIsGuest ? 'false' : 'true' ?>;
|
||||
window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
|
||||
<?php if ($layoutFreeTierBalance >= 0): ?>
|
||||
window.DBN_FREE_TIER_BALANCE = <?= $layoutFreeTierBalance ?>;
|
||||
window.DBN_USER_TIER = <?= json_encode(FreeTier::tier((int)$_SESSION['dbn_tools_sso_uid'])) ?>;
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
<?php if (date('m-d') === '05-17'): ?>
|
||||
|
||||
Reference in New Issue
Block a user