Repository navigation
feat(teams): org-enforced lock policy (#510) - #101
Merged
Merged
Conversation
kipavy
force-pushed
the
feat/org-lock-policy
branch
from
October 8, 2026 14:10
3b6c720 to
bf0ea27
Compare
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server half of the org-enforced lock policy (VoltiusApp/voltius#510, spec 3).
What it adds
057_team_lock_policy.sql:teams.lock_max_minutes INT NULL(NULL = no policy) andteams.lock_force_vault BOOL NOT NULL DEFAULT false.PUT /v1/teams/:team_id/lock-policywith{max_minutes, force_vault}andDELETEon the same path, both 204.max_minutesmust be one of0, 5, 15, 30, 60, 240(0 = Immediately), else 400.MANAGE_VAULTorADMINISTRATOR, the same check as renaming the team (extracted intorequire_vault_manager, whichrename_teamnow uses too).team.lock_policy_set/team.lock_policy_removedaudit event and notifies every member (team_members:<id>).GET /v1/teamsrows gainlock_policy: null | {max_minutes, force_vault}.Plan gate
Business only, through
require_granular: below Business a PUT returns 402 and a DELETE still works, so an existing policy stays enforced until an admin removes it. Self-hosted counts as Business.Compatibility and rollback
lock_policyand don't enforce it; the client PR says so in its admin panel.SERVER_TAGto the previous image; the extra columns are inert.Tests
cargo test --bin voltius-server: 692 passed (rebased on main 1f952b3) (7 new inroutes::team_lock_policy).cargo clippy --all-targets -- -D warningsclean.