Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Core/AdminConsole/Enums/PolicyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static string GetName(this PolicyType type)
PolicyType.BlockClaimedDomainAccountCreation => "Block account creation for claimed domains",
PolicyType.OrganizationUserNotification => "Vault banner message",
PolicyType.SendControls => "Send controls",
PolicyType.FillAssist => "Fill Assist",
PolicyType.FillAssist => "Activate fill assist",

@bensbits91 bensbits91 Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Changing this to be sentence case, and also so the text in the error toast (in clients) matches the policy name.

};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyEventHandlers;

public class FillAssistPolicyEventHandler : IPolicyValidationEvent
public class FillAssistPolicyEventHandler : IPolicyValidationEvent, IEnforceDependentPoliciesEvent
{
public PolicyType Type => PolicyType.FillAssist;
public IEnumerable<PolicyType> RequiredPolicies => [PolicyType.SingleOrg];
Comment thread
bensbits91 marked this conversation as resolved.

public Task<string> ValidateAsync(SavePolicyModel policyRequest, Policy? currentPolicy)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ await OrganizationTestHelpers.CreateUserAsync(_factory, orgB.Id,
public async Task Put_FillAssistPolicy_Success()
{
// Arrange
// FillAssist requires SingleOrg to be enabled first (IEnforceDependentPoliciesEvent).
await _client.PutAsync(
$"/organizations/{_organization.Id}/policies/{PolicyType.SingleOrg}",
JsonContent.Create(new SavePolicyRequest { Policy = new PolicyRequestModel { Enabled = true } }));

var policyType = PolicyType.FillAssist;
const string rulesUrl = "https://github.com/bitwarden/map-the-web/releases/latest/download";
var request = new SavePolicyRequest
Expand Down
Loading