Write members of groups to NoteDb on group updates
The members of a group are stored in a separate file alongside the one which is used for the basic group properties. Both files are written to the same branch. In order to allow atomic updates of group properties and members (e.g. during group creation), the implementation in NoteDb uses only one commit to update both files. The code is structured in a way that the implementation for subgroups can be added easily in a follow-up change. We need to keep GroupsUpdate#adNewGroupMembers for the moment because the creation of a group is not prepared for NoteDb yet. The added code regarding NoteDb won't be executed until we remove the flag writeGroupsToNoteDb when the implementation for writing groups to NoteDb is finished. Change-Id: Ic61d4a088714e484dc3e45a522627ac662df55b7
This commit is contained in:
@@ -39,6 +39,7 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
import java.io.IOException;
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
|
||||
@Singleton
|
||||
@@ -65,7 +66,7 @@ public class PutAgreement implements RestModifyView<AccountResource, AgreementIn
|
||||
|
||||
@Override
|
||||
public Response<String> apply(AccountResource resource, AgreementInput input)
|
||||
throws IOException, OrmException, RestApiException {
|
||||
throws IOException, OrmException, RestApiException, ConfigInvalidException {
|
||||
if (!agreementsEnabled) {
|
||||
throw new MethodNotAllowedException("contributor agreements disabled");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user