[PR #3150] [MERGED] [PM-7407] Implemented check for organizations with unassigned items #23431

Closed
opened 2026-04-16 23:30:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3150
Author: @fedemkr
Created: 4/11/2024
Status: Merged
Merged: 4/12/2024
Merged by: @fedemkr

Base: mainHead: mobiletf/pm-7407/popup-organization-unassigned-items


📝 Commits (2)

  • ea8bf24 PM-7407 Implemented check for organizations with unassigned items
  • 744077f PM-7407 Added particular message for Self-Host on organization unassigned items check

📊 Changes

20 files changed (+166 additions, -3 deletions)

View changed files

📝 src/Core/Abstractions/IApiService.cs (+1 -0)
📝 src/Core/Abstractions/ICipherService.cs (+1 -0)
📝 src/Core/Abstractions/IStateService.cs (+2 -0)
📝 src/Core/Constants.cs (+2 -0)
📝 src/Core/Models/AppOptions.cs (+1 -0)
📝 src/Core/Pages/Accounts/LockPage.xaml.cs (+1 -0)
📝 src/Core/Pages/Accounts/LoginApproveDevicePage.xaml.cs (+2 -0)
📝 src/Core/Pages/Accounts/LoginPage.xaml.cs (+2 -0)
📝 src/Core/Pages/Accounts/LoginPasswordlessRequestPage.xaml.cs (+2 -0)
📝 src/Core/Pages/Accounts/SetPasswordPage.xaml.cs (+2 -0)
📝 src/Core/Pages/Accounts/TwoFactorPage.xaml.cs (+2 -0)
📝 src/Core/Pages/TabsPage.cs (+1 -1)
📝 src/Core/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs (+5 -1)
📝 src/Core/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs (+60 -0)
📝 src/Core/Resources/Localization/AppResources.Designer.cs (+36 -0)
📝 src/Core/Resources/Localization/AppResources.resx (+12 -0)
📝 src/Core/Services/ApiService.cs (+5 -0)
📝 src/Core/Services/CipherService.cs (+18 -0)
📝 src/Core/Services/StateService.cs (+10 -0)
📝 src/Core/Utilities/ServiceContainer.cs (+1 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add check for organization with unassigned items to display a message to the user if it's needed.

Code changes

  • Constants: Added new feature flag for this check
  • ApiService: Added new endpoint call to check whether the organization has any unassigned items
  • CipherService: Added method to verify if an organization has any unassigned items
  • AppOptions: Added flag to see if the user has just logged in / unlocked their vault when displaying the GroupingsPage
    • Other files related with AppOptions: Updated the new flag of AppOptions and passed along the options object to get to the GroupingsPage
  • StateService: Added new Get/Set method for the flag of if one should or not perform this check
  • GroupingsPageViewModel: Added logic to check the organization unassigned items based on the feature flag and the "should check" local flag (depending on what the user chose on an already shown dialog). Also, it waits if a sync is in progress to have the latest data locally as I'm checking whether the user has any organizations so not to call the endpoint on the cases where the user doesn't belong to an org.

Screenshots

Unassigned items notice iOS

Unassigned items notice iOS Unassigned items notice iOS

Unassigned items notice Android

Unassigned items notice Android Unassigned items notice Android

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 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/3150 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 4/11/2024 **Status:** ✅ Merged **Merged:** 4/12/2024 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `main` ← **Head:** `mobiletf/pm-7407/popup-organization-unassigned-items` --- ### 📝 Commits (2) - [`ea8bf24`](https://github.com/bitwarden/android/commit/ea8bf2452414979087e41fc865f171e948ca4831) PM-7407 Implemented check for organizations with unassigned items - [`744077f`](https://github.com/bitwarden/android/commit/744077f229a6bc0e28dbad549aae56d100a56cff) PM-7407 Added particular message for Self-Host on organization unassigned items check ### 📊 Changes **20 files changed** (+166 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Abstractions/IApiService.cs` (+1 -0) 📝 `src/Core/Abstractions/ICipherService.cs` (+1 -0) 📝 `src/Core/Abstractions/IStateService.cs` (+2 -0) 📝 `src/Core/Constants.cs` (+2 -0) 📝 `src/Core/Models/AppOptions.cs` (+1 -0) 📝 `src/Core/Pages/Accounts/LockPage.xaml.cs` (+1 -0) 📝 `src/Core/Pages/Accounts/LoginApproveDevicePage.xaml.cs` (+2 -0) 📝 `src/Core/Pages/Accounts/LoginPage.xaml.cs` (+2 -0) 📝 `src/Core/Pages/Accounts/LoginPasswordlessRequestPage.xaml.cs` (+2 -0) 📝 `src/Core/Pages/Accounts/SetPasswordPage.xaml.cs` (+2 -0) 📝 `src/Core/Pages/Accounts/TwoFactorPage.xaml.cs` (+2 -0) 📝 `src/Core/Pages/TabsPage.cs` (+1 -1) 📝 `src/Core/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs` (+5 -1) 📝 `src/Core/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs` (+60 -0) 📝 `src/Core/Resources/Localization/AppResources.Designer.cs` (+36 -0) 📝 `src/Core/Resources/Localization/AppResources.resx` (+12 -0) 📝 `src/Core/Services/ApiService.cs` (+5 -0) 📝 `src/Core/Services/CipherService.cs` (+18 -0) 📝 `src/Core/Services/StateService.cs` (+10 -0) 📝 `src/Core/Utilities/ServiceContainer.cs` (+1 -1) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add check for organization with unassigned items to display a message to the user if it's needed. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **Constants:** Added new feature flag for this check * **ApiService:** Added new endpoint call to check whether the organization has any unassigned items * **CipherService:** Added method to verify if an organization has any unassigned items * **AppOptions:** Added flag to see if the user has just logged in / unlocked their vault when displaying the `GroupingsPage` * **Other files related with AppOptions**: Updated the new flag of `AppOptions` and passed along the options object to get to the `GroupingsPage` * **StateService:** Added new Get/Set method for the flag of if one should or not perform this check * **GroupingsPageViewModel:** Added logic to check the organization unassigned items based on the feature flag and the "should check" local flag (depending on what the user chose on an already shown dialog). Also, it waits if a sync is in progress to have the latest data locally as I'm checking whether the user has any organizations so not to call the endpoint on the cases where the user doesn't belong to an org. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ### Unassigned items notice iOS <img width="314" alt="Unassigned items notice iOS" src="https://github.com/bitwarden/mobile/assets/15682323/c77aa9ac-d1ae-457b-b961-29d1ff715adb"> <img width="314" alt="Unassigned items notice iOS" src="https://github.com/bitwarden/mobile/assets/542036/6c9157b1-729b-4c6c-83ce-af3145091d08"> ### Unassigned items notice Android <img width="314" alt="Unassigned items notice Android" src="https://github.com/bitwarden/mobile/assets/15682323/873f9df3-d15a-46dc-a525-b312ec30adfe"> <img width="314" alt="Unassigned items notice Android" src="https://github.com/bitwarden/mobile/assets/542036/6086db5a-d31b-4fcf-b920-1bbd5442d8f2"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <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-16 23:30:56 -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#23431