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

[Session manager] Sessions without encryption support should not prompt to verify (PSG-1004) #7736

Merged
merged 4 commits into from
Dec 9, 2022

Conversation

mnaturel
Copy link
Contributor

@mnaturel mnaturel commented Dec 7, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Render a specific UI in session manager screens (main screen and session overview screen) when a session does not support encryption.

Motivation and context

Closes #7733
See also element-hq/element-web#23722

Screenshots / GIFs


Tests

For my tests, I mocked locally the data (setting the CryptoDeviceInfo to null)

  • Enable new Session manager labs flag
  • Go to "Settings -> Security & Privacy -> Show all sessions"
  • Check the UI for the current session is correct
  • Press a session entry in the other sessions list which does support encryption
  • Check the UI for the session overview screen is correct
  • Press "Learn more"
  • Check the displayed text is correct

Tested devices

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

Checklist

@mnaturel mnaturel marked this pull request as ready for review December 7, 2022 15:14
@mnaturel mnaturel requested review from a team and fedrunov and removed request for a team December 7, 2022 15:14
} else {
R.string.device_manager_learn_more_sessions_unverified
private fun showLearnMoreInfoVerificationStatus(roomEncryptionTrustLevel: RoomEncryptionTrustLevel?) {
val args = when(roomEncryptionTrustLevel) {

Choose a reason for hiding this comment

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

  • 🚫 Missing spacing after "when"

@@ -25,11 +25,15 @@ class GetEncryptionTrustLevelForDeviceUseCase @Inject constructor(
private val getEncryptionTrustLevelForOtherDeviceUseCase: GetEncryptionTrustLevelForOtherDeviceUseCase,
) {

fun execute(currentSessionCrossSigningInfo: CurrentSessionCrossSigningInfo, cryptoDeviceInfo: CryptoDeviceInfo?): RoomEncryptionTrustLevel {
fun execute(currentSessionCrossSigningInfo: CurrentSessionCrossSigningInfo, cryptoDeviceInfo: CryptoDeviceInfo?): RoomEncryptionTrustLevel? {
if(cryptoDeviceInfo == null) {

Choose a reason for hiding this comment

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

  • 🚫 Missing spacing after "if"

@sonarcloud
Copy link

sonarcloud bot commented Dec 7, 2022

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

57.1% 57.1% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@fedrunov fedrunov 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 merged commit be7b49b into develop Dec 9, 2022
@mnaturel mnaturel deleted the fix/mna/session-without-crypto-keys branch December 9, 2022 08:52
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.

[Session manager] Sessions without encryption support should not prompt to verify
3 participants