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

[Device management] Sign out a session (PSG-742) #7243

Merged
merged 17 commits into from
Sep 29, 2022

Conversation

mnaturel
Copy link
Contributor

@mnaturel mnaturel commented Sep 27, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Adding a signout button in the session overview screen.

Motivation and context

Closes #7190

Screenshots / GIFs

Tests

  • Enable the feature flag for new device management
  • Go to Settings -> Security & Privacy -> Show all sessions (WIP, V2)
  • Press a session item to go to the corresponding session overview screen
  • Press the signout button
  • Check reauth is asked if needed
  • Check the screen is exited after signout is done
  • Check the session has disappeared from the screens
  • Try the same process with the current session
  • Check the app is restarted in this case

Tested devices

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

Checklist

@mnaturel mnaturel changed the title [Device management] Sign out a session [Device management] Sign out a session (PSG-742) Sep 27, 2022
@mnaturel mnaturel marked this pull request as ready for review September 27, 2022 13:41
@mnaturel mnaturel requested review from a team, Florian14 and jmartinesp and removed request for a team and Florian14 September 27, 2022 13:42
@mnaturel mnaturel force-pushed the feature/mna/device-manager-signout-session branch from 241f57b to f415cba Compare September 28, 2022 12:12
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mnaturel mnaturel force-pushed the feature/mna/device-manager-signout-session branch from f415cba to e47bf2b Compare September 28, 2022 14:45
@mnaturel
Copy link
Contributor Author

To improve it, we need to add a confirmation dialog when trying to sign out another session like for the current session.

@mnaturel
Copy link
Contributor Author

@jmartinesp I have added a confirmation dialog for all session types since it is a destructive operation. You can see it here: 082fa1e

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

74.9% 74.9% Coverage
0.0% 0.0% Duplication

@jmartinesp
Copy link
Member

The last change seems to be working fine and the code makes sense. It feels a bit weird to have a SignOutUiWorker that's not shared for sign out from current session and sign out from other sessions, but it's not a blocker.

@mnaturel
Copy link
Contributor Author

The last change seems to be working fine and the code makes sense. It feels a bit weird to have a SignOutUiWorker that's not shared for sign out from current session and sign out from other sessions, but it's not a blocker.

Yes I am also concerned about that (especially because it is not easily testable right now) but that would mean to refactor all the signout of current session process. I didn't want to start this work in this PR.

@mnaturel mnaturel merged commit 75a381e into develop Sep 29, 2022
@mnaturel mnaturel deleted the feature/mna/device-manager-signout-session branch September 29, 2022 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device management] Sign out a session
2 participants