feat: add email verification check to unsubscribe page

Security Enhancement:
- Server-side validation of email status before allowing unsubscribe
- Only allow unsubscribing from verified emails
- Show "Action Not Allowed" message for unverified/unsubscribed emails
- Extract and validate share-id on server side
- Return 404 for invalid share-ids or missing tenant emails

Implementation:
- Convert page.tsx to async server component
- Fetch location and check tenantEmailStatus
- Pass isVerified prop to client component
- Add bilingual "not-allowed" translations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-29 20:33:16 +01:00
parent bc7b28e6e9
commit 5d1602df7f
4 changed files with 54 additions and 2 deletions

View File

@@ -482,6 +482,10 @@
"error": {
"title": "Unsubscribe Failed",
"unknown": "An error occurred while unsubscribing. Please try again or contact your landlord."
},
"not-allowed": {
"title": "Action Not Allowed",
"message": "You can only unsubscribe from verified email addresses. This email address has not been verified yet or has already been unsubscribed."
}
},
"privacy-policy-page": {

View File

@@ -479,6 +479,10 @@
"error": {
"title": "Odjava Nije Uspjela",
"unknown": "Došlo je do greške prilikom odjave. Molimo pokušajte ponovno ili kontaktirajte vašeg vlasnika nekretnine."
},
"not-allowed": {
"title": "Akcija Nije Dopuštena",
"message": "Možete se odjaviti samo s potvrđenih email adresa. Ova email adresa još nije potvrđena ili je već odjavljena."
}
},
"privacy-policy-page": {