diff --git a/src/app/organizations/manage/policies.component.html b/src/app/organizations/manage/policies.component.html index f1c0be51..69737160 100644 --- a/src/app/organizations/manage/policies.component.html +++ b/src/app/organizations/manage/policies.component.html @@ -5,7 +5,7 @@ {{'loading' | i18n}} -
|
diff --git a/src/app/organizations/manage/policy-edit.component.html b/src/app/organizations/manage/policy-edit.component.html
index ae357623..a5f4024e 100644
--- a/src/app/organizations/manage/policy-edit.component.html
+++ b/src/app/organizations/manage/policy-edit.component.html
@@ -21,27 +21,68 @@
-
-
+
diff --git a/src/app/organizations/manage/policy-edit.component.ts b/src/app/organizations/manage/policy-edit.component.ts
index 4f0688aa..235a9d16 100644
--- a/src/app/organizations/manage/policy-edit.component.ts
+++ b/src/app/organizations/manage/policy-edit.component.ts
@@ -10,9 +10,7 @@ import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import { ApiService } from 'jslib/abstractions/api.service';
-import { CollectionService } from 'jslib/abstractions/collection.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
-import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { PolicyType } from 'jslib/enums/policyType';
@@ -38,25 +36,27 @@ export class PolicyEditComponent implements OnInit {
// Master password
+ masterPassMinComplexity?: number;
masterPassMinLength?: number;
-
- // TODO
+ masterPassRequireUpper?: number;
+ masterPassRequireLower?: number;
+ masterPassRequireNumbers?: number;
+ masterPassRequireSpecial?: number;
// Password generator
passGenMinLength?: number;
- passGenMinNumbers?: number;
- passGenMinSpecial?: number;
- passGenUseNumbers?: boolean;
- passGenUseSpecial?: boolean;
passGenUseUpper?: boolean;
passGenUseLower?: boolean;
+ passGenUseNumbers?: boolean;
+ passGenUseSpecial?: boolean;
+ passGenMinNumbers?: number;
+ passGenMinSpecial?: number;
private policy: PolicyResponse;
constructor(private apiService: ApiService, private i18nService: I18nService,
- private analytics: Angulartics2, private toasterService: ToasterService,
- private collectionService: CollectionService, private platformUtilsService: PlatformUtilsService) { }
+ private analytics: Angulartics2, private toasterService: ToasterService) { }
async ngOnInit() {
await this.load();
@@ -73,15 +73,20 @@ export class PolicyEditComponent implements OnInit {
switch (this.type) {
case PolicyType.PasswordGenerator:
this.passGenMinLength = this.policy.data.minLength;
+ this.passGenUseUpper = this.policy.data.useUpper;
+ this.passGenUseLower = this.policy.data.useLower;
+ this.passGenUseNumbers = this.policy.data.useNumbers;
+ this.passGenUseSpecial = this.policy.data.useSpecial;
this.passGenMinNumbers = this.policy.data.minNumbers;
this.passGenMinSpecial = this.policy.data.minSpecial;
- this.passGenUseLower = this.policy.data.useLower;
- this.passGenUseUpper = this.policy.data.useUpper;
- this.passGenUseSpecial = this.policy.data.useSpecial;
- this.passGenUseNumbers = this.policy.data.useNumbers;
break;
case PolicyType.MasterPassword:
+ this.masterPassMinComplexity = this.policy.data.minComplexity;
this.masterPassMinLength = this.policy.data.minLength;
+ this.masterPassRequireUpper = this.policy.data.requireUpper;
+ this.masterPassRequireLower = this.policy.data.requireLower;
+ this.masterPassRequireNumbers = this.policy.data.requireNumbers;
+ this.masterPassRequireSpecial = this.policy.data.requireSpecial;
break;
default:
break;
@@ -105,18 +110,23 @@ export class PolicyEditComponent implements OnInit {
switch (this.type) {
case PolicyType.PasswordGenerator:
request.data = {
- minLength: this.passGenMinLength,
- minNumbers: this.passGenMinNumbers,
- minSpecial: this.passGenMinSpecial,
+ minLength: this.passGenMinLength || null,
+ useUpper: this.passGenUseUpper,
+ useLower: this.passGenUseLower,
useNumbers: this.passGenUseNumbers,
useSpecial: this.passGenUseSpecial,
- useLower: this.passGenUseLower,
- useUpper: this.passGenUseUpper,
+ minNumbers: this.passGenMinNumbers || null,
+ minSpecial: this.passGenMinSpecial || null,
};
break;
case PolicyType.MasterPassword:
request.data = {
- minLength: this.masterPassMinLength,
+ minComplexity: this.masterPassMinComplexity || null,
+ minLength: this.masterPassMinLength || null,
+ requireUpper: this.masterPassRequireUpper,
+ requireLower: this.masterPassRequireLower,
+ requireNumbers: this.masterPassRequireNumbers,
+ requireSpecial: this.masterPassRequireSpecial,
};
break;
default:
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 9bdf4155..a59df526 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -805,6 +805,9 @@
"passwordGenerator": {
"message": "Password Generator"
},
+ "minComplexityScore": {
+ "message": "Minimum Complexity Score"
+ },
"minNumbers": {
"message": "Minimum Numbers"
},
@@ -2960,4 +2963,4 @@
"clone": {
"message": "Clone"
}
-}
\ No newline at end of file
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
+
+
-
+
+
+
-
-
+
-
+
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
|