[PR #5234] [CLOSED] [PM-21405] Delete account error message #5595

Closed
opened 2025-11-27 00:10:32 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5234
Author: @andrebispo5
Created: 5/20/2025
Status: Closed

Base: mainHead: pm-21405/delete-account-message


📝 Commits (2)

  • 8375d9f [PM-21405] Localise error message when user tries to delete an account but is owned by the organisation.
  • 8e80bbd [PM-21405] PR suggestions

📊 Changes

9 files changed (+160 additions, -11 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+12 -2)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/model/DeleteAccountResult.kt (+5 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModel.kt (+9 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationViewModel.kt (+6 -0)
📝 app/src/main/res/values/strings.xml (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+32 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModelTest.kt (+33 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationViewModelTest.kt (+36 -0)
📝 network/src/main/kotlin/com/bitwarden/network/model/DeleteAccountResponseJson.kt (+26 -9)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-21405

📔 Objective

When a user completes JIT provisioning into an organization with a claimed domain, their account may enter a “Needs confirmation” state. If the user then attempts to delete their account, the server returns an error.

This PR adds handling for that specific server error and displays a localised error dialog to inform the user appropriately.

📸 Screenshots

Description

## Reminders before review
  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/5234 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 5/20/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pm-21405/delete-account-message` --- ### 📝 Commits (2) - [`8375d9f`](https://github.com/bitwarden/android/commit/8375d9f4a2e657ccc846781ff2ff04fe85890e19) [PM-21405] Localise error message when user tries to delete an account but is owned by the organisation. - [`8e80bbd`](https://github.com/bitwarden/android/commit/8e80bbdc2e8c21c44c3622b2d3b2247c8f708176) [PM-21405] PR suggestions ### 📊 Changes **9 files changed** (+160 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+12 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/model/DeleteAccountResult.kt` (+5 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModel.kt` (+9 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationViewModel.kt` (+6 -0) 📝 `app/src/main/res/values/strings.xml` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+32 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModelTest.kt` (+33 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationViewModelTest.kt` (+36 -0) 📝 `network/src/main/kotlin/com/bitwarden/network/model/DeleteAccountResponseJson.kt` (+26 -9) </details> ### 📄 Description ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/PM-21405 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> When a user completes JIT provisioning into an organization with a claimed domain, their account may enter a “Needs confirmation” state. If the user then attempts to delete their account, the server returns an error. This PR adds handling for that specific server error and displays a localised error dialog to inform the user appropriately. ## 📸 Screenshots <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> <p align="center"> <img src="https://github.com/user-attachments/assets/d62a999f-bc7e-4dfc-98a2-5dc0f40cff79" alt="Description" width="300"> </p> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-27 00:10:32 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5595