[PR #7420] Add admin controls for vault timeout and export policies #41376

Open
opened 2026-07-18 06:25:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/7420
Author: @tom27052006
Created: 7/14/2026
Status: 🔄 Open

Base: mainHead: agent/admin-vault-timeout-export-policies


📝 Commits (1)

  • a3232c9 Add admin controls for timeout and export policies

📊 Changes

6 files changed (+456 additions, -9 deletions)

View changed files

📝 src/api/admin.rs (+126 -2)
📝 src/api/core/organizations.rs (+32 -3)
📝 src/db/models/mod.rs (+1 -1)
📝 src/db/models/org_policy.rs (+108 -2)
📝 src/static/scripts/admin_organizations.js (+96 -1)
📝 src/static/templates/admin/organizations.hbs (+93 -0)

📄 Description

Summary

This adds support for the following organization policies:

  • MaximumVaultTimeout (policy type 9), including timeout type, duration, and action
  • DisablePersonalVaultExport (policy type 10)

Because Bitwarden's corresponding policy editor UI is not open source, both policies are configured from the organization overview in Vaultwarden's /admin interface.

The implementation also validates incoming timeout policy data, supports legacy timeout payloads without an explicit type, and enforces the SingleOrg prerequisite used by these policies. No database migration is required because the existing organization policy table is reused.

Testing

  • cargo check --features sqlite
  • cargo clippy --features sqlite -- -D warnings
  • cargo test --features sqlite maximum_vault_timeout_tests
  • node --check src/static/scripts/admin_organizations.js
  • git diff --check
  • Manual /admin testing on desktop and mobile layouts
  • Manual browser-extension testing for timeout enforcement and export removal

🔄 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/dani-garcia/vaultwarden/pull/7420 **Author:** [@tom27052006](https://github.com/tom27052006) **Created:** 7/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `agent/admin-vault-timeout-export-policies` --- ### 📝 Commits (1) - [`a3232c9`](https://github.com/dani-garcia/vaultwarden/commit/a3232c9855198219488576b6adea64f30cbf1442) Add admin controls for timeout and export policies ### 📊 Changes **6 files changed** (+456 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/api/admin.rs` (+126 -2) 📝 `src/api/core/organizations.rs` (+32 -3) 📝 `src/db/models/mod.rs` (+1 -1) 📝 `src/db/models/org_policy.rs` (+108 -2) 📝 `src/static/scripts/admin_organizations.js` (+96 -1) 📝 `src/static/templates/admin/organizations.hbs` (+93 -0) </details> ### 📄 Description ## Summary This adds support for the following organization policies: - `MaximumVaultTimeout` (policy type 9), including timeout type, duration, and action - `DisablePersonalVaultExport` (policy type 10) Because Bitwarden's corresponding policy editor UI is not open source, both policies are configured from the organization overview in Vaultwarden's `/admin` interface. The implementation also validates incoming timeout policy data, supports legacy timeout payloads without an explicit `type`, and enforces the `SingleOrg` prerequisite used by these policies. No database migration is required because the existing organization policy table is reused. ## Testing - `cargo check --features sqlite` - `cargo clippy --features sqlite -- -D warnings` - `cargo test --features sqlite maximum_vault_timeout_tests` - `node --check src/static/scripts/admin_organizations.js` - `git diff --check` - Manual `/admin` testing on desktop and mobile layouts - Manual browser-extension testing for timeout enforcement and export removal --- <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-07-18 06:25:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#41376