mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-07 09:31:31 +01:00
Show policy in effect banner for password generator (#76)
This commit is contained in:
parent
862057dca6
commit
6c52942204
@ -79,6 +79,24 @@ export class PasswordGeneratorComponent implements OnInit {
|
|||||||
this.showOptions = !this.showOptions;
|
this.showOptions = !this.showOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hasPolicyInEffect() {
|
||||||
|
if (this.enforcedPolicyOptions == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.enforcedPolicyOptions.minLength > 0
|
||||||
|
|| this.enforcedPolicyOptions.numberCount > 0
|
||||||
|
|| this.enforcedPolicyOptions.specialCount > 0
|
||||||
|
|| this.enforcedPolicyOptions.useUppercase
|
||||||
|
|| this.enforcedPolicyOptions.useLowercase
|
||||||
|
|| this.enforcedPolicyOptions.useNumbers
|
||||||
|
|| this.enforcedPolicyOptions.useSpecial) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private normalizeOptions() {
|
private normalizeOptions() {
|
||||||
this.options.minLowercase = 0;
|
this.options.minLowercase = 0;
|
||||||
this.options.minUppercase = 0;
|
this.options.minUppercase = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user