element-android
element-android copied to clipboard
Respect the secure backup methods setting
Type of change
- [ ] Feature
- [x] Bugfix
- [ ] Technical
- [ ] Other :
Content
On the backend secure_backup_setup_methods is set to passphrase. Due to the bug app still allowed to select Security Key when setting up backup.
The issue was that code loading the methods was executed after the BootstrapStep.FirstForm was created, and the step was not updated
viewModelScope.launch(Dispatchers.IO) {
val wellKnown = rawService.getElementWellknown(session.sessionParams)
setState {
copy(
isSecureBackupRequired = wellKnown?.isSecureBackupRequired().orFalse(),
secureBackupMethod = wellKnown?.secureBackupMethod() ?: SecureBackupMethod.KEY_OR_PASSPHRASE,
)
}
}
Screenshots / GIFs
Before

After

Tests
Set elementE2E?.secureBackupSetupMethods to passphrase on the backend
Open app with valid login
Go to Security & Privacy settings
Select "Reset Secure Backup"
Tested devices
- [x] Physical
- [ ] Emulator
- OS version(s): Android 11
Checklist
- [ ] Changes has been tested on an Android device or Android emulator with API 21
- [ ] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#accessibility
- [x] Pull request is based on the develop branch
- [x] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#changelog
- [x] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a sign off
- [x] You've made a self review of your PR
- [ ] If you have modified the screen flow, or added new screens to the application, you have updated the test UiAllScreensSanityTest.allScreensTest()
Hello @ggajews , thanks for the proposal change. The description is quite clear and the changes look decent. I would defer to @BillCarsonFr for another approval.
Also can you add a sign off to your Pull request? More info here
Hi @BillCarsonFr, will you find some time to review this small PR?
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.