mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Enforce password generator policy options in the UI (#393)
This commit is contained in:
@@ -114,7 +114,7 @@ const lockService = new LockService(cipherService, folderService, collectionServ
|
|||||||
const syncService = new SyncService(userService, apiService, settingsService,
|
const syncService = new SyncService(userService, apiService, settingsService,
|
||||||
folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService,
|
folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService,
|
||||||
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
||||||
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService);
|
const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService, policyService);
|
||||||
const totpService = new TotpService(storageService, cryptoFunctionService);
|
const totpService = new TotpService(storageService, cryptoFunctionService);
|
||||||
const containerService = new ContainerService(cryptoService);
|
const containerService = new ContainerService(cryptoService);
|
||||||
const authService = new AuthService(cryptoService, apiService,
|
const authService = new AuthService(cryptoService, apiService,
|
||||||
|
|||||||
@@ -70,22 +70,22 @@
|
|||||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||||
<label for="uppercase">A-Z</label>
|
<label for="uppercase">A-Z</label>
|
||||||
<input id="uppercase" type="checkbox" (change)="saveOptions()"
|
<input id="uppercase" type="checkbox" (change)="saveOptions()"
|
||||||
[(ngModel)]="options.uppercase">
|
[disabled]="enforcedPolicyOptions?.useUppercase" [(ngModel)]="options.uppercase">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||||
<label for="lowercase">a-z</label>
|
<label for="lowercase">a-z</label>
|
||||||
<input id="lowercase" type="checkbox" (change)="saveOptions()"
|
<input id="lowercase" type="checkbox" (change)="saveOptions()"
|
||||||
[(ngModel)]="options.lowercase">
|
[disabled]="enforcedPolicyOptions?.useLowercase" [(ngModel)]="options.lowercase">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||||
<label for="numbers">0-9</label>
|
<label for="numbers">0-9</label>
|
||||||
<input id="numbers" type="checkbox" (change)="saveOptions()"
|
<input id="numbers" type="checkbox" (change)="saveOptions()"
|
||||||
[(ngModel)]="options.number">
|
[disabled]="enforcedPolicyOptions?.useNumbers" [(ngModel)]="options.number">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||||
<label for="special">!@#$%^&*</label>
|
<label for="special">!@#$%^&*</label>
|
||||||
<input id="special" type="checkbox" (change)="saveOptions()"
|
<input id="special" type="checkbox" (change)="saveOptions()"
|
||||||
[(ngModel)]="options.special">
|
[disabled]="enforcedPolicyOptions?.useSpecial" [(ngModel)]="options.special">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,12 +93,12 @@
|
|||||||
<div class="box-content condensed">
|
<div class="box-content condensed">
|
||||||
<div class="box-content-row box-content-row-input" appBoxRow>
|
<div class="box-content-row box-content-row-input" appBoxRow>
|
||||||
<label for="min-number">{{'minNumbers' | i18n}}</label>
|
<label for="min-number">{{'minNumbers' | i18n}}</label>
|
||||||
<input id="min-number" type="number" min="0" max="9" (input)="saveOptions()"
|
<input id="min-number" type="number" min="0" max="9" (blur)="saveOptions()"
|
||||||
[(ngModel)]="options.minNumber">
|
[(ngModel)]="options.minNumber">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row box-content-row-input" appBoxRow>
|
<div class="box-content-row box-content-row-input" appBoxRow>
|
||||||
<label for="min-special">{{'minSpecial' | i18n}}</label>
|
<label for="min-special">{{'minSpecial' | i18n}}</label>
|
||||||
<input id="min-special" type="number" min="0" max="9" (input)="saveOptions()"
|
<input id="min-special" type="number" min="0" max="9" (blur)="saveOptions()"
|
||||||
[(ngModel)]="options.minSpecial">
|
[(ngModel)]="options.minSpecial">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||||
|
|||||||
Reference in New Issue
Block a user