mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Merge branch '579-unsubscribe-from-shared-blogs' into 'master'
Allow unsubscribing from shared blogs Only personal blogs from non-contacts can be removed. This also adds integration tests that check the conditions under which blogs can actually be removed. Closes #579 See merge request !268
This commit is contained in:
@@ -11,16 +11,13 @@ public class Blog extends Forum {
|
||||
private final String description;
|
||||
@NotNull
|
||||
private final Author author;
|
||||
private final boolean permanent;
|
||||
|
||||
public Blog(@NotNull Group group, @NotNull String name,
|
||||
@NotNull String description, @NotNull Author author,
|
||||
boolean permanent) {
|
||||
@NotNull String description, @NotNull Author author) {
|
||||
super(group, name, null);
|
||||
|
||||
this.description = description;
|
||||
this.author = author;
|
||||
this.permanent = permanent;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -32,8 +29,4 @@ public class Blog extends Forum {
|
||||
public Author getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public boolean isPermanent() {
|
||||
return permanent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.briarproject.api.blogs;
|
||||
|
||||
import org.briarproject.api.FormatException;
|
||||
import org.briarproject.api.contact.Contact;
|
||||
import org.briarproject.api.identity.Author;
|
||||
import org.briarproject.api.sync.Group;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -20,6 +20,9 @@ public interface BlogManager {
|
||||
Blog addBlog(LocalAuthor localAuthor, String name, String description)
|
||||
throws DbException;
|
||||
|
||||
/** Returns true if a blog can be removed. */
|
||||
boolean canBeRemoved(GroupId g) throws DbException;
|
||||
|
||||
/** Removes and deletes a blog. */
|
||||
void removeBlog(Blog b) throws DbException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user