mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PM-14964] revert passphrase minimum (#12019)
* revert passphrase minimum * add recommendation text to browser refresh; hide hint text when value exceeds recommendation * migrate validators to generator configuration
This commit is contained in:
@@ -2889,8 +2889,8 @@
|
||||
"generateEmail": {
|
||||
"message": "Generate email"
|
||||
},
|
||||
"generatorBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$",
|
||||
"spinboxBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$.",
|
||||
"description": "Explains spin box minimum and maximum values to the user",
|
||||
"placeholders": {
|
||||
"min": {
|
||||
@@ -2903,6 +2903,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"passwordLengthRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ characters or more to generate a strong password.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a length to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "14"
|
||||
}
|
||||
}
|
||||
},
|
||||
"passphraseNumWordsRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ words or more to generate a strong passphrase.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a number of words to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usernameType": {
|
||||
"message": "Username type"
|
||||
},
|
||||
|
||||
@@ -2444,8 +2444,8 @@
|
||||
"generateEmail": {
|
||||
"message": "Generate email"
|
||||
},
|
||||
"generatorBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$",
|
||||
"spinboxBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$.",
|
||||
"description": "Explains spin box minimum and maximum values to the user",
|
||||
"placeholders": {
|
||||
"min": {
|
||||
@@ -2458,6 +2458,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"passwordLengthRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ characters or more to generate a strong password.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a length to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "14"
|
||||
}
|
||||
}
|
||||
},
|
||||
"passphraseNumWordsRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ words or more to generate a strong passphrase.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a number of words to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usernameType": {
|
||||
"message": "Username type"
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { BehaviorSubject, map } from "rxjs";
|
||||
|
||||
import { PolicyType } from "@bitwarden/common/admin-console/enums";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { DefaultPassphraseBoundaries, DefaultPasswordBoundaries } from "@bitwarden/generator-core";
|
||||
import { Generators } from "@bitwarden/generator-core";
|
||||
|
||||
import { BasePolicy, BasePolicyComponent } from "./base-policy.component";
|
||||
|
||||
@@ -26,8 +26,8 @@ export class PasswordGeneratorPolicyComponent extends BasePolicyComponent {
|
||||
minLength: [
|
||||
null,
|
||||
[
|
||||
Validators.min(DefaultPasswordBoundaries.length.min),
|
||||
Validators.max(DefaultPasswordBoundaries.length.max),
|
||||
Validators.min(Generators.password.settings.constraints.length.min),
|
||||
Validators.max(Generators.password.settings.constraints.length.max),
|
||||
],
|
||||
],
|
||||
useUpper: [null],
|
||||
@@ -37,22 +37,22 @@ export class PasswordGeneratorPolicyComponent extends BasePolicyComponent {
|
||||
minNumbers: [
|
||||
null,
|
||||
[
|
||||
Validators.min(DefaultPasswordBoundaries.minDigits.min),
|
||||
Validators.max(DefaultPasswordBoundaries.minDigits.max),
|
||||
Validators.min(Generators.password.settings.constraints.minNumber.min),
|
||||
Validators.max(Generators.password.settings.constraints.minNumber.max),
|
||||
],
|
||||
],
|
||||
minSpecial: [
|
||||
null,
|
||||
[
|
||||
Validators.min(DefaultPasswordBoundaries.minSpecialCharacters.min),
|
||||
Validators.max(DefaultPasswordBoundaries.minSpecialCharacters.max),
|
||||
Validators.min(Generators.password.settings.constraints.minSpecial.min),
|
||||
Validators.max(Generators.password.settings.constraints.minSpecial.max),
|
||||
],
|
||||
],
|
||||
minNumberWords: [
|
||||
null,
|
||||
[
|
||||
Validators.min(DefaultPassphraseBoundaries.numWords.min),
|
||||
Validators.max(DefaultPassphraseBoundaries.numWords.max),
|
||||
Validators.min(Generators.passphrase.settings.constraints.numWords.min),
|
||||
Validators.max(Generators.passphrase.settings.constraints.numWords.max),
|
||||
],
|
||||
],
|
||||
capitalize: [null],
|
||||
|
||||
@@ -6468,8 +6468,8 @@
|
||||
"generateEmail": {
|
||||
"message": "Generate email"
|
||||
},
|
||||
"generatorBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$",
|
||||
"spinboxBoundariesHint": {
|
||||
"message": "Value must be between $MIN$ and $MAX$.",
|
||||
"description": "Explains spin box minimum and maximum values to the user",
|
||||
"placeholders": {
|
||||
"min": {
|
||||
@@ -6482,6 +6482,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"passwordLengthRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ characters or more to generate a strong password.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a length to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "14"
|
||||
}
|
||||
}
|
||||
},
|
||||
"passphraseNumWordsRecommendationHint": {
|
||||
"message": " Use $RECOMMENDED$ words or more to generate a strong passphrase.",
|
||||
"description": "Appended to `spinboxBoundariesHint` to recommend a number of words to the user. This must include any language-specific 'sentence' separator characters (e.g. a space in english).",
|
||||
"placeholders": {
|
||||
"recommended": {
|
||||
"content": "$1",
|
||||
"example": "6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"usernameType": {
|
||||
"message": "Username type"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user