bitwarden_policies/policy_type.rs
1//! The [`PolicyType`] enum.
2
3use serde_repr::{Deserialize_repr, Serialize_repr};
4#[cfg(feature = "wasm")]
5use wasm_bindgen::prelude::wasm_bindgen;
6
7/// The type of an organization policy.
8///
9/// The integer value matches the server's wire format.
10#[derive(PartialEq, Eq, Hash, Serialize_repr, Deserialize_repr, Debug, Copy, Clone)]
11#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]
12#[cfg_attr(feature = "wasm", wasm_bindgen)]
13#[repr(u8)]
14pub enum PolicyType {
15 /// Requires members to have two-step login enabled on their account.
16 TwoFactorAuthentication = 0,
17 /// Sets minimum requirements for members' master passwords.
18 MasterPassword = 1,
19 /// Sets minimum requirements for the password generator.
20 PasswordGenerator = 2,
21 /// Restricts members to being part of a single organization.
22 SingleOrg = 3,
23 /// Requires members to authenticate with single sign-on.
24 RequireSso = 4,
25 /// Forces newly added or cloned items to be owned by the organization rather than the
26 /// member's personal vault. Also enables My Items functionality.
27 OrganizationDataOwnership = 5,
28 /// Disables the ability to create and edit Bitwarden Sends.
29 ///
30 /// Superseded by [`SendControls`](Self::SendControls) when the
31 /// `pm-31885-send-controls` feature flag is active.
32 DisableSend = 6,
33 /// Sets restrictions or defaults for Bitwarden Sends.
34 ///
35 /// Superseded by [`SendControls`](Self::SendControls) when the
36 /// `pm-31885-send-controls` feature flag is active.
37 SendOptions = 7,
38 /// Allows administrators to recover member accounts.
39 ResetPassword = 8,
40 /// Sets the maximum allowed vault timeout for members.
41 MaximumVaultTimeout = 9,
42 /// Disables members' ability to export their personal vault.
43 DisablePersonalVaultExport = 10,
44 /// Activates autofill on page load in the browser extension.
45 ActivateAutofill = 11,
46 /// Automatically logs members into apps using single sign-on.
47 AutomaticAppLogIn = 12,
48 /// Removes members' access to the free Bitwarden Families sponsorship benefit.
49 FreeFamiliesSponsorship = 13,
50 /// Prevents members from unlocking the app with a PIN.
51 RemoveUnlockWithPin = 14,
52 /// Restricts the item types that members can create.
53 RestrictedItemTypes = 15,
54 /// Sets the default URI match detection strategy for autofill.
55 UriMatchDefaults = 16,
56 /// Sets the default behavior for the autotype feature.
57 AutotypeDefaultSetting = 17,
58 /// Automatically confirms invited users into the organization.
59 AutomaticUserConfirmation = 18,
60 /// Blocks account creation for users with email addresses on claimed domains.
61 BlockClaimedDomainAccountCreation = 19,
62 /// Displays an organization-configured banner message to members in their vault.
63 OrganizationUserNotification = 20,
64 /// Configures Send-related behavior: disabling Sends, email visibility, access controls,
65 /// Send types, and deletion.
66 ///
67 /// Supersedes [`DisableSend`](Self::DisableSend) and [`SendOptions`](Self::SendOptions) when
68 /// the `pm-31885-send-controls` feature flag is active on the server.
69 SendControls = 21,
70}