mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Show policy in effect banner for password generator (#76)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user