Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / DeleteImagePage.java
index 3bbaf3d..69b1d27 100644 (file)
@@ -57,7 +57,7 @@ public class DeleteImagePage extends SoneTemplatePage {
                if (image == null) {
                        throw new RedirectException("invalid.html");
                }
-               if (!webInterface.getCore().isLocalSone(image.getSone())) {
+               if (!image.getSone().isLocal()) {
                        throw new RedirectException("noPermission.html");
                }
                if (request.getMethod() == Method.POST) {