Sharing changes from server 1.6.0, and BerryTree import - #92
Merged
Merged
Conversation
… system edits The hand-written PATCH adapters only wrote the fields they listed, and the list was missing password and totp_code on all three bodies, never_shareable and fronting_private on members, and privacy on groups. So a re-auth prompt never reached the server, the two member guards never saved, and a group's privacy could not be changed at all. Tests now build each body with every field set and check every key is on the wire, so a field added later without an adapter entry fails here.
Adds include_all_public_members from server 1.6.0 as another exposure flag, so it steps up and stages the same way the others do. While it is on, the members section says the hand-picked list is kept but not in use, and the audit line reports the served count instead of comparing it to that list.
Server 1.6.0 stages a member's privacy raise on the member itself (pending_privacy, privacy_activates_at) instead of hiding them from views. The editor now loads the level the member is heading for and says when it takes effect. Privacy is only sent when it was edited, because any other level counts as a lowering and would cancel the wait. Creating a member as Public passes the re-auth credentials through, since that can now publish them.
Uses the 1.6.0 preview endpoint and the shared import flow. Template members are off by default, fronting types are noted on front history, and the unsupported sections and BerryTree's own export errors are listed before anything is imported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the app up to date with the sharing changes in server 1.6.0 and adds the new BerryTree importer. Also fixes a bug in the PATCH adapters that this work depends on.
Sharing
include_all_public_members). It's treated like the other exposure flags, so on a live view it steps up and stages. While it's on, the members section explains that the hand-picked list is kept but not in use, and the Sharing audit line shows the served count on its own.pending_privacy/privacy_activates_atand shows when a member will go Public.privacyis now only sent when it was edited, because the server treats any non-public value as a lowering, and a lowering cancels the staged raise. Before this, editing only a member's name would have silently cancelled the wait.Link previews were already supported.
BerryTree import (experimental)
Added as another source in the shared import flow. Template members are off by default, and the note on them explains they only come across when all members are selected. Fronting types are mentioned on front history. The unsupported sections and BerryTree's own
export_errorsare listed in the preview. The job detail page already shows the runner's warning events, so the list shows up there after the import too.Fix: PATCH adapters dropped fields
MemberUpdate,GroupUpdateandSystemUpdateuse hand-written adapters, and those never wrotepassword/totp_code.never_shareableandfronting_privatewere missing on members, andprivacywas missing on groups. As a result, re-auth never reached the server, the member guard switches didn't save, and a group's privacy couldn't be changed. The new tests build each body with every field set and assert every key is written.Testing
:app:testOpenDebugUnitTestpasses (the new adapter tests failed before the fix):app:compileOpenDebugKotlinand:app:compilePlayDebugKotlinpass