[PR #1530] [MERGED] Vault Timeout Policy #2946

Closed
opened 2025-11-26 23:26:16 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1530
Author: @Hinton
Created: 9/7/2021
Status: Merged
Merged: 9/23/2021
Merged by: @Hinton

Base: masterHead: feature/vault-timeout


📝 Commits (6)

📊 Changes

16 files changed (+3211 additions, -1233 deletions)

View changed files

📝 src/App/App.xaml.cs (+1 -6)
📝 src/App/Pages/Settings/SettingsPage/SettingsPage.xaml (+23 -3)
📝 src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs (+12 -1)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageListItem.cs (+7 -1)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs (+88 -13)
📝 src/App/Resources/AppResources.Designer.cs (+3003 -1191)
📝 src/App/Resources/AppResources.resx (+6 -0)
📝 src/App/Services/MobilePlatformUtilsService.cs (+0 -5)
📝 src/Core/Abstractions/IPlatformUtilsService.cs (+0 -1)
📝 src/Core/Abstractions/IPolicyService.cs (+2 -0)
📝 src/Core/Abstractions/IVaultTimeoutService.cs (+1 -0)
📝 src/Core/Enums/PolicyType.cs (+1 -0)
📝 src/Core/Models/Domain/Organization.cs (+1 -0)
📝 src/Core/Services/PolicyService.cs (+27 -2)
📝 src/Core/Services/VaultTimeoutService.cs (+36 -7)
📝 src/Core/Utilities/ServiceContainer.cs (+3 -3)

📄 Description

Objective

Implements a Vault Timeout Policy which lets organizations restrict the maximum vault timeout. It also adds support for custom vault timeouts.

Code Changes

  • src/Core/Services/VaultTimeoutService.cs: Added GetVaultTimeout which calculates the vault timeout to ensure it's less than allowed org.
  • src/Core/Services/PolicyService.cs: Ported PolicyAppliesToUser from `https://github.com/bitwarden/jslib/pull/466
  • src/Core/Models/Domain/Organization.cs: Ported IsExcemptFromPolicies.
  • src/Core/Enums/PolicyType.cs: Added enums for policies.
  • src/Core/Abstractions/IPlatformUtilsService.cs: Removed deprecated LockTimeout.
  • src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs: Add support for vault timeout policy, and custom input.
  • src/App/Pages/Settings/SettingsPage/SettingsPageListItem.cs: Hackish way to add time picker to settings list.

Screenshots

image
image


🔄 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/1530 **Author:** [@Hinton](https://github.com/Hinton) **Created:** 9/7/2021 **Status:** ✅ Merged **Merged:** 9/23/2021 **Merged by:** [@Hinton](https://github.com/Hinton) **Base:** `master` ← **Head:** `feature/vault-timeout` --- ### 📝 Commits (6) - [`cbe12b2`](https://github.com/bitwarden/android/commit/cbe12b2e576a0de8bf79aa5ced3bbaf0a3e9f9e6) Add support for vault timeout policy - [`bb2b4f5`](https://github.com/bitwarden/android/commit/bb2b4f5cbaeb447f71dc46e015ff1f38cdc8b23a) Add support for custom time picker - [`bff3c52`](https://github.com/bitwarden/android/commit/bff3c52ba12ddc4e5dee762c4f95ea1c1ea6e7cd) Cleanup - [`85f6a7a`](https://github.com/bitwarden/android/commit/85f6a7a44bab2ca7150b1e56775d98545c6d09b7) Remove unused language string - [`c5d7c42`](https://github.com/bitwarden/android/commit/c5d7c42639a77592db4fd9b19117901b2a007e24) Wrap policy in frame - [`188256b`](https://github.com/bitwarden/android/commit/188256bcbe226073d3ae4525739c91133a7e75d1) Merge branch 'master' of https://github.com/bitwarden/mobile into feature/vault-timeout ### 📊 Changes **16 files changed** (+3211 additions, -1233 deletions) <details> <summary>View changed files</summary> 📝 `src/App/App.xaml.cs` (+1 -6) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPage.xaml` (+23 -3) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs` (+12 -1) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageListItem.cs` (+7 -1) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs` (+88 -13) 📝 `src/App/Resources/AppResources.Designer.cs` (+3003 -1191) 📝 `src/App/Resources/AppResources.resx` (+6 -0) 📝 `src/App/Services/MobilePlatformUtilsService.cs` (+0 -5) 📝 `src/Core/Abstractions/IPlatformUtilsService.cs` (+0 -1) 📝 `src/Core/Abstractions/IPolicyService.cs` (+2 -0) 📝 `src/Core/Abstractions/IVaultTimeoutService.cs` (+1 -0) 📝 `src/Core/Enums/PolicyType.cs` (+1 -0) 📝 `src/Core/Models/Domain/Organization.cs` (+1 -0) 📝 `src/Core/Services/PolicyService.cs` (+27 -2) 📝 `src/Core/Services/VaultTimeoutService.cs` (+36 -7) 📝 `src/Core/Utilities/ServiceContainer.cs` (+3 -3) </details> ### 📄 Description ## Objective Implements a *Vault Timeout Policy* which lets organizations restrict the maximum vault timeout. It also adds support for custom vault timeouts. ### Code Changes * **src/Core/Services/VaultTimeoutService.cs**: Added `GetVaultTimeout` which calculates the vault timeout to ensure it's less than allowed org. * **src/Core/Services/PolicyService.cs**: Ported `PolicyAppliesToUser` from `https://github.com/bitwarden/jslib/pull/466 * **src/Core/Models/Domain/Organization.cs**: Ported `IsExcemptFromPolicies`. * **src/Core/Enums/PolicyType.cs**: Added enums for policies. * **src/Core/Abstractions/IPlatformUtilsService.cs**: Removed deprecated `LockTimeout`. * **src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs**: Add support for vault timeout policy, and custom input. * **src/App/Pages/Settings/SettingsPage/SettingsPageListItem.cs**: Hackish way to add time picker to settings list. ### Screenshots ![image](https://user-images.githubusercontent.com/137855/132694667-1610eff6-5cdd-4e22-a43a-3aaa4ad067a3.png) ![image](https://user-images.githubusercontent.com/137855/132390216-dda769b3-0ee9-4494-84be-9c9d59767b3b.png) --- <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-26 23:26:16 -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#2946