[PR #6391] [MERGED] Cleanup organizations #19297

Closed
opened 2026-04-15 03:44:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6391
Author: @david-livefront
Created: 1/21/2026
Status: Merged
Merged: 1/27/2026
Merged by: @david-livefront

Base: mainHead: cleanup-organizations


📝 Commits (3)

  • 23fe935 Rename helper function to specify notwork model
  • cca1300 Add helper method from creating an Organization in tests
  • c81d952 Confine organization network models to the repository

📊 Changes

31 files changed (+324 additions, -537 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt (+2 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+9 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/model/Organization.kt (+4 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/util/SyncResponseJsonExtensions.kt (+17 -13)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt (+8 -8)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/manager/UserStateManagerTest.kt (+2 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+36 -65)
app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/model/OrganizationUtil.kt (+31 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AuthDiskSourceExtensionsTest.kt (+13 -62)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/SyncResponseJsonExtensionsTest.kt (+10 -27)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/UserStateJsonExtensionsTest.kt (+41 -96)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/PolicyManagerTest.kt (+16 -16)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/event/OrganizationEventManagerTest.kt (+4 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerTest.kt (+2 -2)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/util/VaultSdkCollectionExtensionsTest.kt (+3 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordViewModelTest.kt (+30 -31)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt (+3 -4)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityViewModelTest.kt (+9 -18)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+3 -8)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensionsTest.kt (+3 -7)

...and 11 more files

📄 Description

🎟️ Tracking

N/A

📔 Objective

This PR cleans up usages of the Organization models.

  • Test usages of organization have been simplified by adding a new createMockOrganization test helper
  • The network response model for organization is no longer exposed outside of the AuthRepository.
  • The name property has been updated to be nonnull and we filter out organizations with null names (This change mirrors the iOS app).

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/6391 **Author:** [@david-livefront](https://github.com/david-livefront) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@david-livefront](https://github.com/david-livefront) **Base:** `main` ← **Head:** `cleanup-organizations` --- ### 📝 Commits (3) - [`23fe935`](https://github.com/bitwarden/android/commit/23fe93593146e6a8645a5c0e5c13449f5577c6fa) Rename helper function to specify notwork model - [`cca1300`](https://github.com/bitwarden/android/commit/cca1300136adcb0305a39874c1229c2bb6b105f2) Add helper method from creating an Organization in tests - [`c81d952`](https://github.com/bitwarden/android/commit/c81d9527214b508f2318b6a872e2484bbee38c54) Confine organization network models to the repository ### 📊 Changes **31 files changed** (+324 additions, -537 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt` (+2 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+9 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/model/Organization.kt` (+4 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/util/SyncResponseJsonExtensions.kt` (+17 -13) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt` (+8 -8) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/manager/UserStateManagerTest.kt` (+2 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+36 -65) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/model/OrganizationUtil.kt` (+31 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/AuthDiskSourceExtensionsTest.kt` (+13 -62) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/SyncResponseJsonExtensionsTest.kt` (+10 -27) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/util/UserStateJsonExtensionsTest.kt` (+41 -96) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/PolicyManagerTest.kt` (+16 -16) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/event/OrganizationEventManagerTest.kt` (+4 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultSyncManagerTest.kt` (+2 -2) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/util/VaultSdkCollectionExtensionsTest.kt` (+3 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordViewModelTest.kt` (+30 -31) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt` (+3 -4) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityViewModelTest.kt` (+9 -18) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+3 -8) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensionsTest.kt` (+3 -7) _...and 11 more files_ </details> ### 📄 Description ## 🎟️ Tracking N/A ## 📔 Objective This PR cleans up usages of the `Organization` models. * Test usages of organization have been simplified by adding a new `createMockOrganization` test helper * The network response model for organization is no longer exposed outside of the `AuthRepository`. * The `name` property has been updated to be nonnull and we filter out organizations with null names (This change mirrors the iOS app). ## ⏰ 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 2026-04-15 03:44:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#19297