From 1de0591743a887caba034fd116bbdf9942b7e575 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 14 Jan 2011 21:50:49 +0100 Subject: [PATCH] Do not require logins for some AJAX pages. --- .../pterodactylus/sone/web/ajax/DismissNotificationAjaxPage.java | 8 ++++++++ .../java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java | 8 ++++++++ .../java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java | 8 ++++++++ .../java/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.java | 8 ++++++++ .../java/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.java | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPage.java index 283e924..08e3ee5 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPage.java @@ -55,4 +55,12 @@ public class DismissNotificationAjaxPage extends JsonPage { return createSuccessJsonObject(); } + /** + * {@inheritDoc} + */ + @Override + protected boolean requiresLogin() { + return false; + } + } diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index a358fb1..659c8d2 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -120,6 +120,14 @@ public class GetStatusAjaxPage extends JsonPage { return false; } + /** + * {@inheritDoc} + */ + @Override + protected boolean requiresLogin() { + return false; + } + // // PRIVATE METHODS // diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java index 36327ca..725b13a 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java @@ -59,4 +59,12 @@ public class GetTranslationPage extends JsonPage { return false; } + /** + * {@inheritDoc} + */ + @Override + protected boolean requiresLogin() { + return false; + } + } diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.java index 6c4ece0..bca9a35 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.java @@ -53,4 +53,12 @@ public class LockSoneAjaxPage extends JsonPage { return createSuccessJsonObject(); } + /** + * {@inheritDoc} + */ + @Override + protected boolean requiresLogin() { + return false; + } + } diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.java index 02682b2..e1c408c 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.java @@ -53,4 +53,12 @@ public class UnlockSoneAjaxPage extends JsonPage { return createSuccessJsonObject(); } + /** + * {@inheritDoc} + */ + @Override + protected boolean requiresLogin() { + return false; + } + } -- 2.7.4