<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}>
@ -203,19 +274,9 @@ Your commits will all be signed by your Nostr keys and saved to the event files
@@ -203,19 +274,9 @@ Your commits will all be signed by your Nostr keys and saved to the event files
@ -359,17 +420,25 @@ Your commits will all be signed by your Nostr keys and saved to the event files
@@ -359,17 +420,25 @@ Your commits will all be signed by your Nostr keys and saved to the event files
// Check if repoRoot exists and is writable (needed for both provisioning and cloning)
if(!existsSync(this.repoRoot)){
try{
mkdirSync(this.repoRoot,{recursive: true});
@ -417,6 +486,42 @@ Your commits will all be signed by your Nostr keys and saved to the event files
@@ -417,6 +486,42 @@ Your commits will all be signed by your Nostr keys and saved to the event files
}
}
if(remoteUrls.length===0){
// No remote URLs - this is an empty repo, provision it instead
logger.info({npub,repoName,cloneUrls,announcementEventId: announcementEvent.id},'No remote clone URLs found - provisioning empty repository');
@ -430,7 +535,8 @@ Your commits will all be signed by your Nostr keys and saved to the event files
@@ -430,7 +535,8 @@ Your commits will all be signed by your Nostr keys and saved to the event files
},'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{
// 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');
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
if(!userLevel){
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.`)) {