1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-20 16:07:45 +01:00

Add the new policy

This commit is contained in:
Cy Okeke 2024-11-06 14:31:27 +01:00
parent b800193d80
commit 91c2e305f1
No known key found for this signature in database
GPG Key ID: 88B341B55C84B45C
6 changed files with 35 additions and 0 deletions

View File

@ -9580,5 +9580,11 @@
},
"organizationUserDeletedDesc": {
"message": "The user was removed from the organization and all associated user data has been deleted."
},
"freeFamiliesSponsorship": {
"message": "Remove Free Bitwarden Families sponsorship"
},
"freeFamiliesSponsorshipPolicyDesc": {
"message": "Do not allow members to redeem a Families plan through this organization."
}
}

View File

@ -7,6 +7,7 @@ import { ActivateAutofillPolicy } from "./admin-console/policies/activate-autofi
import { AutomaticAppLoginPolicy } from "./admin-console/policies/automatic-app-login.component";
import { DisablePersonalVaultExportPolicy } from "./admin-console/policies/disable-personal-vault-export.component";
import { MaximumVaultTimeoutPolicy } from "./admin-console/policies/maximum-vault-timeout.component";
import { FreeFamiliesSponsorshipPolicy } from "./billing/policies/free-families-sponsorship.component";
@Component({
selector: "app-root",
@ -19,6 +20,7 @@ export class AppComponent extends BaseAppComponent implements OnInit {
this.policyListService.addPolicies([
new MaximumVaultTimeoutPolicy(),
new DisablePersonalVaultExportPolicy(),
new FreeFamiliesSponsorshipPolicy(),
new ActivateAutofillPolicy(),
]);

View File

@ -19,6 +19,7 @@ import { DisablePersonalVaultExportPolicyComponent } from "./admin-console/polic
import { MaximumVaultTimeoutPolicyComponent } from "./admin-console/policies/maximum-vault-timeout.component";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { FreeFamiliesSponsorshipPolicyComponent } from "./billing/policies/free-families-sponsorship.component";
/**
* This is the AppModule for the commercial version of Bitwarden.
@ -49,6 +50,7 @@ import { AppComponent } from "./app.component";
MaximumVaultTimeoutPolicyComponent,
ActivateAutofillPolicyComponent,
AutomaticAppLoginPolicyComponent,
FreeFamiliesSponsorshipPolicyComponent,
],
bootstrap: [AppComponent],
})

View File

@ -0,0 +1,4 @@
<bit-form-control>
<input type="checkbox" id="enabled" bitCheckbox [formControl]="enabled" />
<bit-label>{{ "turnOn" | i18n }}</bit-label>
</bit-form-control>

View File

@ -0,0 +1,20 @@
import { Component } from "@angular/core";
import { PolicyType } from "@bitwarden/common/admin-console/enums";
import {
BasePolicy,
BasePolicyComponent,
} from "@bitwarden/web-vault/app/admin-console/organizations/policies/base-policy.component";
export class FreeFamiliesSponsorshipPolicy extends BasePolicy {
name = "freeFamiliesSponsorship";
description = "freeFamiliesSponsorshipPolicyDesc";
type = PolicyType.FreeFamiliesSponsorshipPolicy;
component = FreeFamiliesSponsorshipPolicyComponent;
}
@Component({
selector: "policy-personal-ownership",
templateUrl: "free-families-sponsorship.component.html",
})
export class FreeFamiliesSponsorshipPolicyComponent extends BasePolicyComponent {}

View File

@ -12,4 +12,5 @@ export enum PolicyType {
DisablePersonalVaultExport = 10, // Disable personal vault export
ActivateAutofill = 11, // Activates autofill with page load on the browser extension
AutomaticAppLogIn = 12, // Enables automatic log in of apps from configured identity provider
FreeFamiliesSponsorshipPolicy = 13, // Disables free families plan for organization
}