Write subgroups of groups to NoteDb on group updates

The implementation for subgroups is similar to the one for members
(see Ic61d4a08871 for more details). Subgroups are stored in a
separate file, just as members as stored in an own file.

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: I2409a78785604afb2fba056a94ba0aca3c68593e
This commit is contained in:
Alice Kober-Sotzek
2017-10-24 11:02:44 +02:00
parent 5169e4e199
commit e5c3b3d7a7
7 changed files with 184 additions and 105 deletions

View File

@@ -142,7 +142,8 @@ final class CreateGroupCommand extends SshCommand {
addMembers.apply(rsrc, input);
}
private void addSubgroups(GroupResource rsrc) throws RestApiException, OrmException, IOException {
private void addSubgroups(GroupResource rsrc)
throws RestApiException, OrmException, IOException, ConfigInvalidException {
AddSubgroups.Input input =
AddSubgroups.Input.fromGroups(
initialGroups.stream().map(AccountGroup.UUID::get).collect(toList()));