Suite: let members switch between positions they hold
A member holding #2 and #3 connected #3's wallet, closed the browser, came back, and still saw #2. Not a wallet problem: the sign-in cookie lasts 30 days and there was no sign-out anywhere on the site, so the first position he authenticated as was pinned to that browser and the wallet was never consulted again. This hits precisely the people we tell to buy several positions - the Triple Play is on /how-pay-works and in the chatbot - so it will keep happening. Adds POST /api/public/signout (drops the server session and expires the cookie) and a "not this position? switch" link beside the identity line on /suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,12 +83,20 @@
|
||||
$('suMe').style.display = 'block';
|
||||
$('suMe').innerHTML = '<b>#' + me.id + '</b> — you’re early! The Circle Suite is in <b>team beta</b> right now. Your license is already reserved by your position, and every tool below activates for you the moment we open the doors. Nothing to do — watch the team channel.';
|
||||
$('suConnect').style.display = 'none';
|
||||
var sw = document.getElementById('suSwitch');
|
||||
if (sw) sw.addEventListener('click', async function (ev) {
|
||||
ev.preventDefault();
|
||||
sw.textContent = 'signing out…';
|
||||
try { await fetch('/api/public/signout', { method: 'POST' }); } catch (e) {}
|
||||
location.reload();
|
||||
});
|
||||
me = null; pips(); render();
|
||||
return true;
|
||||
}
|
||||
$('suMe').style.display = 'block';
|
||||
$('suMe').innerHTML = me.inOrg
|
||||
? '<b>#' + me.id + '</b> · ' + me.tierName + ' · Level ' + me.level + ' (' + me.levelName + ')' +
|
||||
' <a href="#" id="suSwitch" style="color:var(--teal);font-size:13px;margin-left:8px">not this position? switch</a>' +
|
||||
(me.directCount >= 2 ? ' · <span style="color:var(--teal)">✓ qualified</span>' : ' · ' + me.directCount + '/2 directs') +
|
||||
'<br>Your license covers <b>Level ' + me.level + '</b> and everything below it' +
|
||||
(me.level < 8 ? ' — your next upgrade extends it to ' + LEVELS[me.level] + '.' : ' — full Suite.')
|
||||
|
||||
Reference in New Issue
Block a user