mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
Refactor orgnaization policy management (#1147)
This commit is contained in:
36
src/app/organizations/policies/reset-password.component.ts
Normal file
36
src/app/organizations/policies/reset-password.component.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
|
||||
import { PolicyType } from 'jslib-common/enums/policyType';
|
||||
|
||||
import { Organization } from 'jslib-common/models/domain/organization';
|
||||
|
||||
import { BasePolicy, BasePolicyComponent } from './base-policy.component';
|
||||
|
||||
export class ResetPasswordPolicy extends BasePolicy {
|
||||
name = 'resetPasswordPolicy';
|
||||
description = 'resetPasswordPolicyDescription';
|
||||
type = PolicyType.ResetPassword;
|
||||
component = ResetPasswordPolicyComponent;
|
||||
|
||||
display(organization: Organization) {
|
||||
return organization.useResetPassword;
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'policy-reset-password',
|
||||
templateUrl: 'reset-password.component.html',
|
||||
})
|
||||
export class ResetPasswordPolicyComponent extends BasePolicyComponent {
|
||||
|
||||
data = this.fb.group({
|
||||
autoEnroll: false,
|
||||
});
|
||||
|
||||
defaultTypes: { name: string; value: string; }[];
|
||||
|
||||
constructor(private fb: FormBuilder) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user