[backend/razor] Improve public preview lockdown error message

This commit is contained in:
Laura Hausmann 2024-08-16 01:05:41 +02:00
parent 173fbfb835
commit d6c8ecaee5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -36,7 +36,8 @@ public class NoteModel(
return Partial("Shared/FrontendSPA"); return Partial("Shared/FrontendSPA");
if (security.Value.PublicPreview == Enums.PublicPreview.Lockdown) if (security.Value.PublicPreview == Enums.PublicPreview.Lockdown)
throw GracefulException.Forbidden("Public preview is disabled on this instance"); throw GracefulException.Forbidden("Public preview is disabled on this instance.",
"The instance administrator has intentionally disabled this feature for privacy reasons.");
//TODO: redirect to login (with route as url param) when public preview is disabled //TODO: redirect to login (with route as url param) when public preview is disabled
//TODO: login button //TODO: login button