Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect the secure backup methods setting #8113

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ggajews
Copy link

@ggajews ggajews commented Feb 10, 2023

Type of change

  • Feature
  • 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
image

After
image

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

  • Physical
  • Emulator
  • OS version(s):
    Android 11

Checklist

@ggajews ggajews changed the title Respect the methods setting Respect the secure backup methods setting Feb 10, 2023
@bmarty bmarty added the Z-Community-PR Issue is solved by a community member's PR label Feb 16, 2023
@bmarty
Copy link
Member

bmarty commented Feb 16, 2023

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

@bmarty bmarty requested a review from BillCarsonFr February 16, 2023 08:46
Signed-off-by: Grzegorz Gajewski <[email protected]>
Signed-off-by: Grzegorz Gajewski <[email protected]>
@ggajews
Copy link
Author

ggajews commented Mar 31, 2023

Hi @BillCarsonFr, will you find some time to review this small PR?

@CLAassistant
Copy link

CLA assistant check
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants