Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / DeletePostAjaxPage.java
index 37ab040..b822e52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - DeletePostAjaxPage.java - Copyright © 2010 David Roden
+ * Sone - DeletePostAjaxPage.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ public class DeletePostAjaxPage extends JsonPage {
                if ((post == null) || (post.getSone() == null)) {
                        return createErrorJsonObject("invalid-post-id");
                }
-               if (!webInterface.getCore().isLocalSone(post.getSone())) {
+               if (!post.getSone().isLocal()) {
                        return createErrorJsonObject("not-authorized");
                }
                webInterface.getCore().deletePost(post);