<divclass="user-badge-avatar-wrapper"title={isVerified?'Verified. This user has write-access to the server because it has write-access to at least one default Nostr relay.':undefined}>
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...',error: verification.error},'Relays down and no cached unlimited access');
// User has cached unlimited access - use it even though verification failed
throwerror(503,'Relays are temporarily unavailable and no cached access level found. Please verify your access level first by visiting your profile page.');
// This handles cases where relays are down or proof event hasn't propagated yet
},'Verification failed but using cached unlimited access');
}elseif(verification.relayDown){
// Relays are down and no cache - temporary issue
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...',error: verification.error},'Relays down and no cached unlimited access');
throwerror(503,'Relays are temporarily unavailable and no cached access level found. Please verify your access level first by visiting your profile page.');
}else{
}else{
// Verification failed - user doesn't have write access
// Verification failed and no cache - user doesn't have write access
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...',error: verification.error},'User does not have unlimited access');
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...',error: verification.error},'User does not have unlimited access');
throwerror(403,`Only users with unlimited access can clone repositories to the server. ${verification.error||'Please verify you can write to at least one default Nostr relay.'}`);
consterrorMsg=verification.error||'Please verify you can write to at least one default Nostr relay.';
throwerror(403,`Only users with unlimited access can clone repositories to the server. ${errorMsg} Note: You only need write access to ONE default relay, not all of them.`);
// No proof event or auth header - check if we have any cached level
// No proof event or auth header - check if we have any cached level
if(!userLevel){
if(!userLevel){
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...'},'No cached user level and no proof event or NIP-98 auth header');
logger.warn({userPubkeyHex: userPubkeyHex.slice(0,16)+'...'},'No cached user level and no proof event or NIP-98 auth header');
throwerror(403,'Only users with unlimited access can clone repositories to the server. Please verify your access level first by visiting your profile page or ensuring you can write to at least one default Nostr relay.');
throwerror(403,'Only users with unlimited access can clone repositories to the server. Please verify your access level first by visiting your profile page or ensuring you can write to at least one default Nostr relay. Note: You only need write access to ONE default relay, not all of them.');
throwerror(403,'Only users with unlimited access can clone repositories to the server. Please verify you can write to at least one default Nostr relay.');
throwerror(403,'Only users with unlimited access can clone repositories to the server. Please verify you can write to at least one default Nostr relay. Note: You only need write access to ONE default relay, not all of them.');
if (!confirm(`Are you sure you want to remove "${state.repo}" from this server?\n\nThis will permanently delete the local clone of the repository. The announcement on Nostr will NOT be deleted.\n\nThis action cannot be undone.\n\nClick OK to delete, or Cancel to abort.`)) {