diff --git a/console/src/app/modules/detail-layout/detail-layout.component.scss b/console/src/app/modules/detail-layout/detail-layout.component.scss index e7b80e7cc..309721c6d 100644 --- a/console/src/app/modules/detail-layout/detail-layout.component.scss +++ b/console/src/app/modules/detail-layout/detail-layout.component.scss @@ -13,7 +13,6 @@ width: 100%; display: flex; padding-bottom: 3rem; - padding-top: 3rem; .detail-left { width: 100px; diff --git a/console/src/app/modules/policies/label-policy/label-policy-routing.module.ts b/console/src/app/modules/policies/label-policy/label-policy-routing.module.ts new file mode 100644 index 000000000..457099b89 --- /dev/null +++ b/console/src/app/modules/policies/label-policy/label-policy-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { LabelPolicyComponent } from './label-policy.component'; + +const routes: Routes = [ + { + path: '', + component: LabelPolicyComponent, + data: { + animation: 'DetailPage', + }, + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class LabelPolicyRoutingModule { } diff --git a/console/src/app/modules/policies/label-policy/label-policy.component.html b/console/src/app/modules/policies/label-policy/label-policy.component.html new file mode 100644 index 000000000..5e5a9bb25 --- /dev/null +++ b/console/src/app/modules/policies/label-policy/label-policy.component.html @@ -0,0 +1,20 @@ + + +
+ + {{'POLICY.LABEL.PRIMARYCOLOR' | translate}} + + + + + {{'POLICY.LABEL.SECONDARYCOLOR' | translate}} + + +
+ +
+ +
+
\ No newline at end of file diff --git a/console/src/app/modules/policies/label-policy/label-policy.component.scss b/console/src/app/modules/policies/label-policy/label-policy.component.scss new file mode 100644 index 000000000..92da6b0de --- /dev/null +++ b/console/src/app/modules/policies/label-policy/label-policy.component.scss @@ -0,0 +1,24 @@ +.content { + padding-top: 1rem; + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 0 -.5rem; + + .form-field { + flex: 1; + margin: 0 .5rem; + } +} + +.btn-container { + display: flex; + justify-content: flex-end; + width: 100%; + + button { + margin-top: 3rem; + display: block; + padding: .5rem 4rem; + } +} diff --git a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.spec.ts b/console/src/app/modules/policies/label-policy/label-policy.component.spec.ts similarity index 54% rename from console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.spec.ts rename to console/src/app/modules/policies/label-policy/label-policy.component.spec.ts index c174486a8..d93217a85 100644 --- a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.spec.ts +++ b/console/src/app/modules/policies/label-policy/label-policy.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IamPolicyGridComponent } from './iam-policy-grid.component'; +import { LabelPolicyComponent } from './label-policy.component'; -describe('IamPolicyGridComponent', () => { - let component: IamPolicyGridComponent; - let fixture: ComponentFixture; +describe('LabelPolicyComponent', () => { + let component: LabelPolicyComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [IamPolicyGridComponent], + declarations: [LabelPolicyComponent], }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(IamPolicyGridComponent); + fixture = TestBed.createComponent(LabelPolicyComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/console/src/app/modules/policies/label-policy/label-policy.component.ts b/console/src/app/modules/policies/label-policy/label-policy.component.ts new file mode 100644 index 000000000..f5852a429 --- /dev/null +++ b/console/src/app/modules/policies/label-policy/label-policy.component.ts @@ -0,0 +1,54 @@ +import { Component, OnDestroy } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { Subscription } from 'rxjs'; +import { DefaultLabelPolicyUpdate, DefaultLabelPolicyView } from 'src/app/proto/generated/admin_pb'; +import { AdminService } from 'src/app/services/admin.service'; +import { ToastService } from 'src/app/services/toast.service'; + +import { PolicyComponentServiceType } from '../policy-component-types.enum'; + + +@Component({ + selector: 'app-label-policy', + templateUrl: './label-policy.component.html', + styleUrls: ['./label-policy.component.scss'], +}) +export class LabelPolicyComponent implements OnDestroy { + public labelData!: DefaultLabelPolicyView.AsObject; + + private sub: Subscription = new Subscription(); + + public PolicyComponentServiceType: any = PolicyComponentServiceType; + constructor( + private route: ActivatedRoute, + private toast: ToastService, + private adminService: AdminService, + ) { + this.route.params.subscribe(() => { + this.getData().then(data => { + if (data) { + this.labelData = data.toObject(); + } + }); + }); + } + + public ngOnDestroy(): void { + this.sub.unsubscribe(); + } + + private async getData(): Promise { + return this.adminService.GetDefaultLabelPolicy(); + } + + public savePolicy(): void { + const req = new DefaultLabelPolicyUpdate(); + req.setPrimaryColor(this.labelData.primaryColor); + req.setSecondaryColor(this.labelData.secondaryColor); + this.adminService.UpdateDefaultLabelPolicy(req).then(() => { + this.toast.showInfo('POLICY.TOAST.SET', true); + }).catch(error => { + this.toast.showError(error); + }); + } +} diff --git a/console/src/app/modules/policies/label-policy/label-policy.module.ts b/console/src/app/modules/policies/label-policy/label-policy.module.ts new file mode 100644 index 000000000..173b7ff6f --- /dev/null +++ b/console/src/app/modules/policies/label-policy/label-policy.module.ts @@ -0,0 +1,34 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; +import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; + +import { LabelPolicyRoutingModule } from './label-policy-routing.module'; +import { LabelPolicyComponent } from './label-policy.component'; + +@NgModule({ + declarations: [LabelPolicyComponent], + imports: [ + LabelPolicyRoutingModule, + CommonModule, + FormsModule, + MatInputModule, + MatFormFieldModule, + MatButtonModule, + MatSlideToggleModule, + MatIconModule, + HasRoleModule, + MatTooltipModule, + TranslateModule, + DetailLayoutModule, + ], +}) +export class LabelPolicyModule { } diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.html b/console/src/app/modules/policies/login-policy/login-policy.component.html index a0465fcc0..bd789dd9c 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.html +++ b/console/src/app/modules/policies/login-policy/login-policy.component.html @@ -1,23 +1,23 @@ -

{{'ORG.POLICY.DEFAULTLABEL' | translate}}

+ [title]="'POLICY.LOGIN_POLICY.TITLE' | translate" + [description]="(serviceType==PolicyComponentServiceType.MGMT ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEMGMT' : PolicyComponentServiceType.ADMIN ? 'POLICY.LOGIN_POLICY.DESCRIPTIONCREATEADMIN' : '') | translate"> +

{{'POLICY.DEFAULTLABEL' | translate}}

- - @@ -26,23 +26,23 @@
- {{'ORG.POLICY.DATA.ALLOWUSERNAMEPASSWORD' | translate}} + {{'POLICY.DATA.ALLOWUSERNAMEPASSWORD' | translate}} -

{{'ORG.POLICY.DATA.ALLOWUSERNAMEPASSWORD_DESC' | translate}}

+

{{'POLICY.DATA.ALLOWUSERNAMEPASSWORD_DESC' | translate}}

- {{'ORG.POLICY.DATA.ALLOWREGISTER' | translate}} + {{'POLICY.DATA.ALLOWREGISTER' | translate}} -

{{'ORG.POLICY.DATA.ALLOWREGISTER_DESC' | translate}}

+

{{'POLICY.DATA.ALLOWREGISTER_DESC' | translate}}

- {{'ORG.POLICY.DATA.ALLOWEXTERNALIDP' | translate}} + {{'POLICY.DATA.ALLOWEXTERNALIDP' | translate}} -

{{'ORG.POLICY.DATA.ALLOWEXTERNALIDP_DESC' | translate}}

+

{{'POLICY.DATA.ALLOWEXTERNALIDP_DESC' | translate}}

diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.ts b/console/src/app/modules/policies/login-policy/login-policy.component.ts index 3feddb8d9..119a25143 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.ts +++ b/console/src/app/modules/policies/login-policy/login-policy.component.ts @@ -128,7 +128,7 @@ export class LoginPolicyComponent implements OnDestroy { public savePolicy(): void { this.updateData().then(() => { - this.toast.showInfo('ORG.POLICY.LOGIN_POLICY.SAVED', true); + this.toast.showInfo('POLICY.LOGIN_POLICY.SAVED', true); this.loading = true; setTimeout(() => { this.fetchData(); @@ -141,7 +141,7 @@ export class LoginPolicyComponent implements OnDestroy { public removePolicy(): void { if (this.serviceType === PolicyComponentServiceType.MGMT) { (this.service as ManagementService).RemoveLoginPolicy().then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.RESETSUCCESS', true); + this.toast.showInfo('POLICY.TOAST.RESETSUCCESS', true); this.loading = true; setTimeout(() => { this.fetchData(); diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html index cda423760..6a8e9754b 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.html @@ -1,18 +1,17 @@ -

{{'ORG.POLICY.DEFAULTLABEL' | translate}}

+ [title]="'POLICY.IAM_POLICY.TITLECREATE' | translate" [description]="'POLICY.IAM_POLICY.DESCRIPTION' | translate"> +

{{'POLICY.DEFAULTLABEL' | translate}}

- {{'ORG.POLICY.DATA.USERLOGINMUSTBEDOMAIN' | translate}} + {{'POLICY.DATA.USERLOGINMUSTBEDOMAIN' | translate}} diff --git a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts index 1f7fc96f0..ba6d15b39 100644 --- a/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts +++ b/console/src/app/modules/policies/org-iam-policy/org-iam-policy.component.ts @@ -83,7 +83,7 @@ export class OrgIamPolicyComponent implements OnDestroy { this.org.id, this.iamData.userLoginMustBeDomain, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -93,7 +93,7 @@ export class OrgIamPolicyComponent implements OnDestroy { this.org.id, this.iamData.userLoginMustBeDomain, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -105,7 +105,7 @@ export class OrgIamPolicyComponent implements OnDestroy { this.org.id, this.iamData.userLoginMustBeDomain, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -116,7 +116,7 @@ export class OrgIamPolicyComponent implements OnDestroy { public removePolicy(): void { if (this.serviceType === PolicyComponentServiceType.MGMT) { this.adminService.RemoveOrgIamPolicy(this.org.id).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.RESETSUCCESS', true); + this.toast.showInfo('POLICY.TOAST.RESETSUCCESS', true); setTimeout(() => { this.fetchData(); }, 1000); diff --git a/console/src/app/modules/policies/password-age-policy/password-age-policy.component.html b/console/src/app/modules/policies/password-age-policy/password-age-policy.component.html index b9f215bcf..53cd17171 100644 --- a/console/src/app/modules/policies/password-age-policy/password-age-policy.component.html +++ b/console/src/app/modules/policies/password-age-policy/password-age-policy.component.html @@ -1,15 +1,15 @@ + [title]="'POLICY.PWD_AGE.TITLE' | translate" [description]="'POLICY.PWD_AGE.DESCRIPTION' | translate">
- {{'ORG.POLICY.DATA.EXPIREWARNDAYS' | translate}} + {{'POLICY.DATA.EXPIREWARNDAYS' | translate}}
- {{'ORG.POLICY.DATA.MAXAGEDAYS' | translate}} + {{'POLICY.DATA.MAXAGEDAYS' | translate}}
- {{'ORG.POLICY.DATA.MINLENGTH' | translate}} + {{'POLICY.DATA.MINLENGTH' | translate}}
- {{'ORG.POLICY.DATA.HASNUMBER' | translate}} + {{'POLICY.DATA.HASNUMBER' | translate}}
- {{'ORG.POLICY.DATA.HASSYMBOL' | translate}} + {{'POLICY.DATA.HASSYMBOL' | translate}}
- {{'ORG.POLICY.DATA.HASLOWERCASE' | translate}} + {{'POLICY.DATA.HASLOWERCASE' | translate}}
- {{'ORG.POLICY.DATA.HASUPPERCASE' | translate}} + {{'POLICY.DATA.HASUPPERCASE' | translate}} diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts index 2eb8786ec..0a578f8a1 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts @@ -76,7 +76,7 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { public removePolicy(): void { if (this.service instanceof ManagementService) { this.service.removePasswordComplexityPolicy().then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.RESETSUCCESS', true); + this.toast.showInfo('POLICY.TOAST.RESETSUCCESS', true); setTimeout(() => { this.fetchData(); }, 1000); @@ -110,7 +110,7 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { this.complexityData.hasSymbol, this.complexityData.minLength, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -122,7 +122,7 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { this.complexityData.hasSymbol, this.complexityData.minLength, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -136,7 +136,7 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { this.complexityData.hasSymbol, this.complexityData.minLength, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); diff --git a/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.html b/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.html index 8ac36fa79..56adc76f9 100644 --- a/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.html +++ b/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.html @@ -1,18 +1,17 @@ -

{{'ORG.POLICY.DEFAULTLABEL' | translate}}

+ [title]="'POLICY.PWD_LOCKOUT.TITLE' | translate" [description]="'POLICY.PWD_LOCKOUT.DESCRIPTION' | translate"> +

{{'POLICY.DEFAULTLABEL' | translate}}

- {{'ORG.POLICY.DATA.MAXATTEMPTS' | translate}} + {{'POLICY.DATA.MAXATTEMPTS' | translate}}
- {{'ORG.POLICY.DATA.SHOWLOCKOUTFAILURES' | translate}} + {{'POLICY.DATA.SHOWLOCKOUTFAILURES' | translate}} diff --git a/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.ts b/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.ts index 0ed3b0985..a01cb8eda 100644 --- a/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.ts +++ b/console/src/app/modules/policies/password-lockout-policy/password-lockout-policy.component.ts @@ -73,7 +73,7 @@ export class PasswordLockoutPolicyComponent implements OnDestroy { public removePolicy(): void { if (this.service instanceof ManagementService) { this.service.RemovePasswordLockoutPolicy().then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.RESETSUCCESS', true); + this.toast.showInfo('POLICY.TOAST.RESETSUCCESS', true); this.fetchData(); }).catch(error => { this.toast.showError(error); @@ -100,7 +100,7 @@ export class PasswordLockoutPolicyComponent implements OnDestroy { this.lockoutData.maxAttempts, this.lockoutData.showLockoutFailure, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -110,7 +110,7 @@ export class PasswordLockoutPolicyComponent implements OnDestroy { this.lockoutData.maxAttempts, this.lockoutData.showLockoutFailure, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); @@ -119,7 +119,7 @@ export class PasswordLockoutPolicyComponent implements OnDestroy { this.lockoutData.maxAttempts, this.lockoutData.showLockoutFailure, ).then(() => { - this.toast.showInfo('ORG.POLICY.TOAST.SET', true); + this.toast.showInfo('POLICY.TOAST.SET', true); }).catch(error => { this.toast.showError(error); }); diff --git a/console/src/app/modules/policies/policy-component-types.enum.ts b/console/src/app/modules/policies/policy-component-types.enum.ts index dc8a2b567..c976011e6 100644 --- a/console/src/app/modules/policies/policy-component-types.enum.ts +++ b/console/src/app/modules/policies/policy-component-types.enum.ts @@ -4,6 +4,7 @@ export enum PolicyComponentType { COMPLEXITY = 'complexity', IAM = 'iam', LOGIN = 'login', + LABEL = 'label', } export enum PolicyComponentServiceType { MGMT = 'mgmt', diff --git a/console/src/app/modules/policy-grid/policy-grid.component.html b/console/src/app/modules/policy-grid/policy-grid.component.html new file mode 100644 index 000000000..28e17b988 --- /dev/null +++ b/console/src/app/modules/policy-grid/policy-grid.component.html @@ -0,0 +1,109 @@ +

{{'POLICY.TITLE' | translate}}

+ +

{{'POLICY.DESCRIPTION' | translate}}

+ +
+ +
+
+ +
+
+ {{'POLICY.PWD_COMPLEXITY.TITLE' | translate}} + +
+ +

+ {{'POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate}}

+ + +
+ +
+
+
+ + +
+
+ +
+
+ {{'POLICY.IAM_POLICY.TITLE' | translate}} + +
+ +

+ {{'POLICY.IAM_POLICY.DESCRIPTION' | translate}}

+ + +
+ + + +
+
+
+ + +
+
+ +
+
+ {{'POLICY.LOGIN_POLICY.TITLE' | translate}} + +
+ + +

+ {{'POLICY.LOGIN_POLICY.DESCRIPTION' | translate}}

+
+ + +
+ + + +
+
+
+ + + +
+
+ +
+
+ {{'POLICY.LABEL.TITLE' | translate}} + +
+ +

+ {{'POLICY.LABEL.DESCRIPTION' | translate}}

+ + +
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/console/src/app/pages/orgs/policy-grid/policy-grid.component.scss b/console/src/app/modules/policy-grid/policy-grid.component.scss similarity index 88% rename from console/src/app/pages/orgs/policy-grid/policy-grid.component.scss rename to console/src/app/modules/policy-grid/policy-grid.component.scss index 31f1d5e39..ed25548ec 100644 --- a/console/src/app/pages/orgs/policy-grid/policy-grid.component.scss +++ b/console/src/app/modules/policy-grid/policy-grid.component.scss @@ -9,11 +9,11 @@ h1 { .row-lyt { display: flex; flex-wrap: wrap; - margin: 0 -1rem; + margin: 0 -.5rem; .p-item { - flex-basis: 300px; - margin: 1rem; + flex-basis: 290px; + margin: .5rem; display: flex; flex-direction: column; min-height: 200px; @@ -38,6 +38,7 @@ h1 { font-size: 2.5rem; height: 2.5rem; line-height: 2.5rem; + color: white; } } @@ -46,7 +47,7 @@ h1 { align-items: center; span { - font-size: 1.2rem; + font-size: 1.1rem; } .icon { @@ -56,7 +57,7 @@ h1 { } .desc { - font-size: .9rem; + font-size: 14px; color: var(--grey); } diff --git a/console/src/app/pages/orgs/policy-grid/policy-grid.component.spec.ts b/console/src/app/modules/policy-grid/policy-grid.component.spec.ts similarity index 100% rename from console/src/app/pages/orgs/policy-grid/policy-grid.component.spec.ts rename to console/src/app/modules/policy-grid/policy-grid.component.spec.ts diff --git a/console/src/app/modules/policy-grid/policy-grid.component.ts b/console/src/app/modules/policy-grid/policy-grid.component.ts new file mode 100644 index 000000000..f5d0d3efb --- /dev/null +++ b/console/src/app/modules/policy-grid/policy-grid.component.ts @@ -0,0 +1,19 @@ +import { Component, Input } from '@angular/core'; +import { PolicyComponentType } from 'src/app/modules/policies/policy-component-types.enum'; + +export enum PolicyGridType { + ORG, + IAM, +} + +@Component({ + selector: 'app-policy-grid', + templateUrl: './policy-grid.component.html', + styleUrls: ['./policy-grid.component.scss'], +}) +export class PolicyGridComponent { + @Input() public type!: PolicyGridType; + public PolicyComponentType: any = PolicyComponentType; + public PolicyGridType: any = PolicyGridType; + constructor() { } +} diff --git a/console/src/app/modules/policy-grid/policy-grid.module.ts b/console/src/app/modules/policy-grid/policy-grid.module.ts new file mode 100644 index 000000000..6dd7f7d3a --- /dev/null +++ b/console/src/app/modules/policy-grid/policy-grid.module.ts @@ -0,0 +1,27 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { RouterModule } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; +import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; + +import { PolicyGridComponent } from './policy-grid.component'; + +@NgModule({ + declarations: [PolicyGridComponent], + imports: [ + CommonModule, + HasRolePipeModule, + HasRoleModule, + TranslateModule, + RouterModule, + MatButtonModule, + MatIconModule, + ], + exports: [ + PolicyGridComponent, + ], +}) +export class PolicyGridModule { } diff --git a/console/src/app/pages/iam/failed-events/failed-events.component.html b/console/src/app/pages/iam/failed-events/failed-events.component.html index 73d4d7e64..2f9d187cf 100644 --- a/console/src/app/pages/iam/failed-events/failed-events.component.html +++ b/console/src/app/pages/iam/failed-events/failed-events.component.html @@ -16,7 +16,7 @@ {{ 'IAM.FAILEDEVENTS.FAILEDSEQUENCE' | translate }} - {{event?.failedSequence}} + {{event?.failedSequence}} diff --git a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.html b/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.html deleted file mode 100644 index 569ae7019..000000000 --- a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.html +++ /dev/null @@ -1,78 +0,0 @@ -

{{'IAM.POLICY.TITLE' | translate}}

- -

{{'IAM.POLICY.DESCRIPTION' | translate}}

- -
- -
-
- -
-
- {{'ORG.POLICY.PWD_COMPLEXITY.TITLE' | translate}} - -
- -

- {{'ORG.POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate}}

- - -
- -
-
-
- - -
-
- -
-
- {{'ORG.POLICY.IAM_POLICY.TITLE' | translate}} - -
- -

- {{'ORG.POLICY.IAM_POLICY.DESCRIPTION' | translate}}

- - -
- - - -
-
-
- - -
-
- -
-
- {{'ORG.POLICY.LOGIN_POLICY.TITLE' | translate}} - -
- -

- {{'ORG.POLICY.LOGIN_POLICY.DESCRIPTION' | translate}}

- - -
- - - -
-
-
-
\ No newline at end of file diff --git a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.scss b/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.scss deleted file mode 100644 index 31f1d5e39..000000000 --- a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.scss +++ /dev/null @@ -1,75 +0,0 @@ -h1 { - font-size: 1.2rem; -} - -.top-desc { - color: var(--grey); -} - -.row-lyt { - display: flex; - flex-wrap: wrap; - margin: 0 -1rem; - - .p-item { - flex-basis: 300px; - margin: 1rem; - display: flex; - flex-direction: column; - min-height: 200px; - padding: 1rem; - - @media only screen and (max-width: 450px) { - flex-basis: 100%; - } - - .avatar { - height: 60px; - width: 60px; - border-radius: 50%; - background: linear-gradient(40deg, rgb(129, 85, 185) 30%, #8983f7); - display: flex; - align-items: center; - justify-content: center; - margin-bottom: .5rem; - - .icon, - i { - font-size: 2.5rem; - height: 2.5rem; - line-height: 2.5rem; - } - } - - .title { - display: flex; - align-items: center; - - span { - font-size: 1.2rem; - } - - .icon { - margin-left: 1rem; - margin-right: 1rem; - } - } - - .desc { - font-size: .9rem; - color: var(--grey); - } - - .fill-space { - flex: 1; - } - - .btn-wrapper { - display: flex; - } - - button { - margin-right: 1rem; - } - } -} diff --git a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.ts b/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.ts deleted file mode 100644 index 45ef94943..000000000 --- a/console/src/app/pages/iam/iam-policy-grid/iam-policy-grid.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component } from '@angular/core'; -import { PolicyComponentType } from 'src/app/modules/policies/policy-component-types.enum'; -import { DefaultLoginPolicy, DefaultPasswordComplexityPolicyView, OrgIamPolicyView } from 'src/app/proto/generated/admin_pb'; -import { PolicyState } from 'src/app/proto/generated/management_pb'; -import { AdminService } from 'src/app/services/admin.service'; -import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; - -@Component({ - selector: 'app-iam-policy-grid', - templateUrl: './iam-policy-grid.component.html', - styleUrls: ['./iam-policy-grid.component.scss'], -}) -export class IamPolicyGridComponent { - public complexityPolicy!: DefaultPasswordComplexityPolicyView.AsObject; - public loginPolicy!: DefaultLoginPolicy.AsObject; - public iamPolicy!: OrgIamPolicyView.AsObject; - - public PolicyState: any = PolicyState; - public PolicyComponentType: any = PolicyComponentType; - - constructor( - private authService: GrpcAuthService, - private adminService: AdminService, - ) { - this.getData(); - } - - private getData(): void { - - this.authService.isAllowed(['policy.read']).subscribe(allowed => { - if (allowed) { - this.adminService.GetDefaultLoginPolicy().then(data => this.loginPolicy = data.toObject()); - this.adminService.GetDefaultPasswordComplexityPolicy().then(data => this.complexityPolicy = data.toObject()); - } - }); - - this.authService.isAllowed(['iam.policy.read']).subscribe(allowed => { - if (allowed) { - this.adminService.GetDefaultOrgIamPolicy().then(data => this.iamPolicy = data.toObject()); - } - }); - } -} diff --git a/console/src/app/pages/iam/iam-routing.module.ts b/console/src/app/pages/iam/iam-routing.module.ts index 752ac7bdb..838152a85 100644 --- a/console/src/app/pages/iam/iam-routing.module.ts +++ b/console/src/app/pages/iam/iam-routing.module.ts @@ -89,6 +89,14 @@ const routes: Routes = [ loadChildren: () => import('src/app/modules/policies/login-policy/login-policy.module') .then(m => m.LoginPolicyModule), }, + { + path: PolicyComponentType.LABEL, + data: { + serviceType: PolicyComponentServiceType.ADMIN, + }, + loadChildren: () => import('src/app/modules/policies/label-policy/label-policy.module') + .then(m => m.LabelPolicyModule), + }, ], }, ]; diff --git a/console/src/app/pages/iam/iam.component.html b/console/src/app/pages/iam/iam.component.html index 928640d7c..db85ded38 100644 --- a/console/src/app/pages/iam/iam.component.html +++ b/console/src/app/pages/iam/iam.component.html @@ -3,7 +3,7 @@

{{'IAM.DETAIL.TITLE' | translate}}

{{'IAM.DETAIL.DESCRIPTION' | translate}}

- + diff --git a/console/src/app/pages/iam/iam.component.ts b/console/src/app/pages/iam/iam.component.ts index 5a7e26bbe..55d248c5d 100644 --- a/console/src/app/pages/iam/iam.component.ts +++ b/console/src/app/pages/iam/iam.component.ts @@ -5,6 +5,7 @@ import { BehaviorSubject, from, Observable, of } from 'rxjs'; import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum'; +import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component'; import { OrgMemberView, UserView } from 'src/app/proto/generated/management_pb'; import { AdminService } from 'src/app/services/admin.service'; import { ToastService } from 'src/app/services/toast.service'; @@ -22,6 +23,8 @@ export class IamComponent { public membersSubject: BehaviorSubject = new BehaviorSubject([]); + public PolicyGridType: any = PolicyGridType; + constructor(public adminService: AdminService, private dialog: MatDialog, private toast: ToastService, private router: Router) { this.loadMembers(); diff --git a/console/src/app/pages/iam/iam.module.ts b/console/src/app/pages/iam/iam.module.ts index 2a9613d1d..cc644d34a 100644 --- a/console/src/app/pages/iam/iam.module.ts +++ b/console/src/app/pages/iam/iam.module.ts @@ -20,6 +20,7 @@ import { CardModule } from 'src/app/modules/card/card.module'; import { ChangesModule } from 'src/app/modules/changes/changes.module'; import { ContributorsModule } from 'src/app/modules/contributors/contributors.module'; import { MetaLayoutModule } from 'src/app/modules/meta-layout/meta-layout.module'; +import { PolicyGridModule } from 'src/app/modules/policy-grid/policy-grid.module'; import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module'; import { SharedModule } from 'src/app/modules/shared/shared.module'; import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; @@ -27,13 +28,12 @@ import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/local import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module'; import { FailedEventsComponent } from './failed-events/failed-events.component'; -import { IamPolicyGridComponent } from './iam-policy-grid/iam-policy-grid.component'; import { IamRoutingModule } from './iam-routing.module'; import { IamViewsComponent } from './iam-views/iam-views.component'; import { IamComponent } from './iam.component'; @NgModule({ - declarations: [IamComponent, IamViewsComponent, FailedEventsComponent, IamPolicyGridComponent], + declarations: [IamComponent, IamViewsComponent, FailedEventsComponent], imports: [ CommonModule, IamRoutingModule, @@ -64,6 +64,7 @@ import { IamComponent } from './iam.component'; RefreshTableModule, HasRolePipeModule, MatSortModule, + PolicyGridModule, ], }) export class IamModule { } diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.html b/console/src/app/pages/orgs/org-detail/org-detail.component.html index eb14ba77f..08e7715a0 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.html +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.html @@ -29,7 +29,7 @@ - +
diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.ts b/console/src/app/pages/orgs/org-detail/org-detail.component.ts index 7983c2370..6ac618ac4 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.ts +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.ts @@ -10,6 +10,7 @@ import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { ChangeType } from 'src/app/modules/changes/changes.component'; import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum'; +import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component'; import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; import { Org, @@ -54,6 +55,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy { public totalMemberResult: number = 0; public membersSubject: BehaviorSubject = new BehaviorSubject([]); + public PolicyGridType: any = PolicyGridType; constructor( private dialog: MatDialog, diff --git a/console/src/app/pages/orgs/orgs.module.ts b/console/src/app/pages/orgs/orgs.module.ts index 457846ec4..afe782f78 100644 --- a/console/src/app/pages/orgs/orgs.module.ts +++ b/console/src/app/pages/orgs/orgs.module.ts @@ -17,6 +17,7 @@ import { MemberCreateDialogModule } from 'src/app/modules/add-member-dialog/memb import { CardModule } from 'src/app/modules/card/card.module'; import { ContributorsModule } from 'src/app/modules/contributors/contributors.module'; import { MetaLayoutModule } from 'src/app/modules/meta-layout/meta-layout.module'; +import { PolicyGridModule } from 'src/app/modules/policy-grid/policy-grid.module'; import { SharedModule } from 'src/app/modules/shared/shared.module'; import { WarnDialogModule } from 'src/app/modules/warn-dialog/warn-dialog.module'; import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; @@ -26,10 +27,9 @@ import { AddDomainDialogModule } from './org-detail/add-domain-dialog/add-domain import { DomainVerificationComponent } from './org-detail/domain-verification/domain-verification.component'; import { OrgDetailComponent } from './org-detail/org-detail.component'; import { OrgsRoutingModule } from './orgs-routing.module'; -import { PolicyGridComponent } from './policy-grid/policy-grid.component'; @NgModule({ - declarations: [OrgDetailComponent, PolicyGridComponent, DomainVerificationComponent], + declarations: [OrgDetailComponent, DomainVerificationComponent], imports: [ CommonModule, HasRolePipeModule, @@ -56,6 +56,7 @@ import { PolicyGridComponent } from './policy-grid/policy-grid.component'; SharedModule, ContributorsModule, CopyToClipboardModule, + PolicyGridModule, ], }) export class OrgsModule { } diff --git a/console/src/app/pages/orgs/policy-grid/policy-grid.component.html b/console/src/app/pages/orgs/policy-grid/policy-grid.component.html deleted file mode 100644 index 4d5705870..000000000 --- a/console/src/app/pages/orgs/policy-grid/policy-grid.component.html +++ /dev/null @@ -1,80 +0,0 @@ -

{{'ORG.POLICY.TITLE' | translate}}

- -

{{'ORG.POLICY.DESCRIPTION' | translate}}

- -
- -
-
- -
-
- {{'ORG.POLICY.PWD_COMPLEXITY.TITLE' | translate}} - -
- -

- {{'ORG.POLICY.PWD_COMPLEXITY.DESCRIPTION' | translate}}

- - -
- -
-
-
- - -
-
- -
-
- {{'ORG.POLICY.IAM_POLICY.TITLE' | translate}} - -
- -

- {{'ORG.POLICY.IAM_POLICY.DESCRIPTION' | translate}}

- - -
- - - -
-
-
- - -
-
- -
-
- {{'ORG.POLICY.LOGIN_POLICY.TITLE' | translate}} - -
- - -

- {{'ORG.POLICY.LOGIN_POLICY.DESCRIPTION' | translate}}

-
- - -
- - - -
-
-
-
\ No newline at end of file diff --git a/console/src/app/pages/orgs/policy-grid/policy-grid.component.ts b/console/src/app/pages/orgs/policy-grid/policy-grid.component.ts deleted file mode 100644 index c1e11aa4f..000000000 --- a/console/src/app/pages/orgs/policy-grid/policy-grid.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component } from '@angular/core'; -import { PolicyComponentType } from 'src/app/modules/policies/policy-component-types.enum'; -import { - LoginPolicyView, - OrgIamPolicyView, - PasswordComplexityPolicyView, - PolicyState, -} from 'src/app/proto/generated/management_pb'; -import { ManagementService } from 'src/app/services/mgmt.service'; -import { ToastService } from 'src/app/services/toast.service'; - -@Component({ - selector: 'app-policy-grid', - templateUrl: './policy-grid.component.html', - styleUrls: ['./policy-grid.component.scss'], -}) -export class PolicyGridComponent { - public complexityPolicy!: PasswordComplexityPolicyView.AsObject; - public iamPolicy!: OrgIamPolicyView.AsObject; - public loginPolicy!: LoginPolicyView.AsObject; - - public PolicyState: any = PolicyState; - public PolicyComponentType: any = PolicyComponentType; - - constructor( - public mgmtService: ManagementService, - private toast: ToastService, - ) { - this.getData(); - } - - private getData(): void { - this.mgmtService.GetPasswordComplexityPolicy().then(data => this.complexityPolicy = data.toObject()).catch(error => { - this.toast.showError(error); - }); - this.mgmtService.GetMyOrgIamPolicy().then(data => this.iamPolicy = data.toObject()); - this.mgmtService.GetLoginPolicy().then(data => { - this.loginPolicy = data.toObject(); - }); - } -} diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts index 9e668fec8..adad72a27 100644 --- a/console/src/app/services/admin.service.ts +++ b/console/src/app/services/admin.service.ts @@ -7,6 +7,9 @@ import { CreateHumanRequest, CreateOrgRequest, CreateUserRequest, + DefaultLabelPolicy, + DefaultLabelPolicyUpdate, + DefaultLabelPolicyView, DefaultLoginPolicy, DefaultLoginPolicyView, DefaultPasswordAgePolicyRequest, @@ -162,6 +165,17 @@ export class AdminService { return this.grpcService.admin.updateDefaultPasswordLockoutPolicy(req); } + /* label */ + + public GetDefaultLabelPolicy(): Promise { + const req = new Empty(); + return this.grpcService.admin.getDefaultLabelPolicy(req); + } + + public UpdateDefaultLabelPolicy(req: DefaultLabelPolicyUpdate): Promise { + return this.grpcService.admin.updateDefaultLabelPolicy(req); + } + /* login */ public GetDefaultLoginPolicy( diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index 9aac01244..ab6debbfe 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -612,13 +612,13 @@ export class ManagementService { public getLocalizedComplexityPolicyPatternErrorString(policy: PasswordComplexityPolicy.AsObject): string { if (policy.hasNumber && policy.hasSymbol) { - return 'ORG.POLICY.PWD_COMPLEXITY.SYMBOLANDNUMBERERROR'; + return 'POLICY.PWD_COMPLEXITY.SYMBOLANDNUMBERERROR'; } else if (policy.hasNumber) { - return 'ORG.POLICY.PWD_COMPLEXITY.NUMBERERROR'; + return 'POLICY.PWD_COMPLEXITY.NUMBERERROR'; } else if (policy.hasSymbol) { - return 'ORG.POLICY.PWD_COMPLEXITY.SYMBOLERROR'; + return 'POLICY.PWD_COMPLEXITY.SYMBOLERROR'; } else { - return 'ORG.POLICY.PWD_COMPLEXITY.PATTERNERROR'; + return 'POLICY.PWD_COMPLEXITY.PATTERNERROR'; } } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 5c6034f0a..be864ad88 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -350,10 +350,6 @@ "DELETE":"Entfernen", "DELETESUCCESS":"Gescheiterte Events entfernt." }, - "POLICY": { - "TITLE":"Standardrichtlinien für ihre Organisationen", - "DESCRIPTION":"Diese Einstellungen können von Organisationen erweitert und/oder verändert werden." - }, "TOAST":{ "MEMBERREMOVED":"Manager entfernt.", "MEMBERSADDED": "Manager hinzugefügt.", @@ -421,74 +417,6 @@ "TITLE":"Manager der Organisation verwalten", "DESCRIPTION":"Definiere hier die Benutzer, die Operationen auf Deinen Organisationen vornehmen dürfen." }, - "POLICY": { - "TITLE":"Richtlinen entdecken", - "DESCRIPTION":"Vorgefertigte Richtlinien, die Dir Zeit sparen und die Sicherheit erhöhen.", - "PWD_COMPLEXITY": { - "TITLE":"Passwortkomplexität", - "DESCRIPTION":"Stellt sicher, dass alle festgelegten Passwörter einem bestimmten Muster entsprechen.", - "TITLECREATE":"Passwortkomplexitätsrichtlinie erstellen", - "DESCRIPTIONCREATE":"Stellt sicher, dass alle festgelegten Passwörter einem bestimmten Muster entsprechen.", - "SYMBOLANDNUMBERERROR":"Das Password muss ein Symbol/Satzzeichen und eine Ziffer beinhalten.", - "SYMBOLERROR":"Das Password muss ein Symbol/Satzzeichen beinhalten.", - "NUMBERERROR":"Das Password muss eine Ziffer beinhalten.", - "PATTERNERROR":"Das Passwort erfüllt nicht die vorgeschriebene Richtlinie." - }, - "PWD_AGE": { - "TITLE":"Gültigkeitsdauer für Passwörter", - "DESCRIPTION":"Du kannst eine Richtlinie für die maximale Gültigkeitsdauer von Passwörtern festlegen. Diese Richtlinie löst eine Warnung nach Ablauf einer festgelegten Gültigkeitsdauer aus.", - "TITLECREATE":"Richtlinie für Gültigkeitsdauer von Passwörtern festlegen", - "DESCRIPTIONCREATE":"Du kannst eine Richtlinie für die Gültigkeitsdauer von Passwörtern festlegen. Diese Richtlinie löst eine Warnung nach Ablauf einer festgelegten Gültigkeitsdauer aus." - }, - "PWD_LOCKOUT": { - "TITLE":"Passwortsperre", - "DESCRIPTION":"Standardmässig sind die Passwortwiederholungen bei Falscheingabe nicht begrenzt. Du musst diese Richtlinie installieren, wenn Du Wiederholungsversuche anzeigen, oder eine maximale Anzahl von wiederholten Passworteingaben festlegen möchtest.", - "TITLECREATE":"Richtline zur Passwortsperre festlegen", - "DESCRIPTIONCREATE":"Standardmässig sind die Passwortwiederholungen bei Falscheingabe nicht begrenzt. Du musst diese Richtlinie anwenden, wenn Du Wiederholungsversuche anzeigen, oder eine maximale Anzahl von wiederholten Passworteingaben festlegen möchtest." - }, - "IAM_POLICY": { - "TITLE":"Zugangseinstellungen IAM", - "DESCRIPTION":"Definiere die Zugangseistellungen für Benutzer.", - "TITLECREATE":"Zugangseinstellungen für IAM festlegen", - "DESCRIPTIONCREATE":"E-Mails als Benutzernamen sind nicht erlaubt, wenn die Eigenschaft \"UserLoginMustBeDomain\" gesetzt ist." - }, - "LOGIN_POLICY": { - "TITLE":"Login Richtlinien", - "DESCRIPTION":"Definiere die Loginmethoden für Benutzer", - "TITLECREATE":"Definiere die Loginmethoden für Benutzer", - "DESCRIPTIONCREATEADMIN":"Nutzer können sich mit den verfügbaren Idps authentifizieren.", - "DESCRIPTIONCREATEMGMT":"Nutzer können sich mit den verfügbaren Idps authentifizieren. Achtung: Es kann zwischen System- und organisationsspezifischen Providern gewählt werden.", - "SAVED":"Erfolgreich gespeichert." - }, - "DEFAULTLABEL":"Die aktuelle Richtlinie entspricht der IAM-Standard Einstellung.", - "BTN_INSTALL":"Installieren", - "BTN_EDIT":"Modifizieren", - "DATA": { - "DESCRIPTION":"Beschreibung", - "MINLENGTH":"Mindestlänge", - "HASNUMBER": "erfordert Ziffer", - "HASSYMBOL": "erfordert Symbol/Satzzeichen", - "HASLOWERCASE": "erfordert Kleinbuchstaben", - "HASUPPERCASE": "erfordert Grossbuchstaben", - "SHOWLOCKOUTFAILURES":"Zeige Anzahl Anmeldeversuche", - "MAXATTEMPTS":"Maximale Anzahl an Versuchen", - "EXPIREWARNDAYS":"Ablauf Warnung nach Tagen", - "MAXAGEDAYS":"Maximale Gültigkeit in Tagen", - "USERLOGINMUSTBEDOMAIN":"Benutzer-Login muss eine Domain sein", - "ALLOWUSERNAMEPASSWORD":"Benutzername Password erlaubt", - "ALLOWEXTERNALIDP":"Externer IDP erlaubt", - "ALLOWREGISTER":"Registrieren erlaubt", - "ALLOWUSERNAMEPASSWORD_DESC":"Der konventionelle Login mit Benutzername und Passwort wird erlaubt.", - "ALLOWEXTERNALIDP_DESC":"Der Login wird für die darunter liegenden Identity Provider erlaubt.", - "ALLOWREGISTER_DESC":"Ist die Option gewählt, erscheint im Login ein zusätzlicher Schritt zum Registrieren eines Benutzers." - }, - "RESET":"Richtlinie zurücksetzen", - "CREATECUSTOM":"Benutzerdefinierte Richtlinie erstellen", - "TOAST":{ - "SET":"Richtline erfolgreich gesetzt!", - "RESETSUCCESS":"Richtline zurückgesetzt!" - } - }, "TOAST": { "DEACTIVATED":"Organisation deaktiviert.", "REACTIVATED":"Organisation reaktiviert.", @@ -500,6 +428,72 @@ "SETPRIMARY":"Primäre Domain gesetzt." } }, + "POLICY": { + "TITLE":"Richtlinen entdecken", + "DESCRIPTION":"Vorgefertigte Richtlinien, die Dir Zeit sparen und die Sicherheit erhöhen.", + "PWD_COMPLEXITY": { + "TITLE":"Passwortkomplexität", + "DESCRIPTION":"Stellt sicher, dass alle festgelegten Passwörter einem bestimmten Muster entsprechen.", + "SYMBOLANDNUMBERERROR":"Das Password muss ein Symbol/Satzzeichen und eine Ziffer beinhalten.", + "SYMBOLERROR":"Das Password muss ein Symbol/Satzzeichen beinhalten.", + "NUMBERERROR":"Das Password muss eine Ziffer beinhalten.", + "PATTERNERROR":"Das Passwort erfüllt nicht die vorgeschriebene Richtlinie." + }, + "PWD_AGE": { + "TITLE":"Gültigkeitsdauer für Passwörter", + "DESCRIPTION":"Du kannst eine Richtlinie für die maximale Gültigkeitsdauer von Passwörtern festlegen. Diese Richtlinie löst eine Warnung nach Ablauf einer festgelegten Gültigkeitsdauer aus." + }, + "PWD_LOCKOUT": { + "TITLE":"Passwortsperre", + "DESCRIPTION":"Standardmässig sind die Passwortwiederholungen bei Falscheingabe nicht begrenzt. Du musst diese Richtlinie installieren, wenn Du Wiederholungsversuche anzeigen, oder eine maximale Anzahl von wiederholten Passworteingaben festlegen möchtest." + }, + "IAM_POLICY": { + "TITLE":"Zugangseinstellungen IAM", + "DESCRIPTION":"Definiere die Zugangseistellungen für Benutzer." + }, + "LOGIN_POLICY": { + "TITLE":"Login Richtlinien", + "DESCRIPTION":"Definiere die Loginmethoden für Benutzer", + "DESCRIPTIONCREATEADMIN":"Nutzer können sich mit den verfügbaren Idps authentifizieren.", + "DESCRIPTIONCREATEMGMT":"Nutzer können sich mit den verfügbaren Idps authentifizieren. Achtung: Es kann zwischen System- und organisationsspezifischen Providern gewählt werden.", + "SAVED":"Erfolgreich gespeichert." + }, + "LABEL": { + "TITLE":"Email Labelling Einstellungen", + "DESCRIPTION":"Definieren Sie das Erscheinungsbild Ihrer Benachrichtigungs-Mails", + "PRIMARYCOLOR":"Hintergrundfarbe", + "SECONDARYCOLOR":"Schriftfarbe", + "SAVED":"Erfolgreich gespeichert." + }, + "DEFAULTLABEL":"Die aktuelle Richtlinie entspricht der IAM-Standard Einstellung.", + "BTN_INSTALL":"Installieren", + "BTN_EDIT":"Modifizieren", + "DATA": { + "DESCRIPTION":"Beschreibung", + "MINLENGTH":"Mindestlänge", + "HASNUMBER": "erfordert Ziffer", + "HASSYMBOL": "erfordert Symbol/Satzzeichen", + "HASLOWERCASE": "erfordert Kleinbuchstaben", + "HASUPPERCASE": "erfordert Grossbuchstaben", + "SHOWLOCKOUTFAILURES":"Zeige Anzahl Anmeldeversuche", + "MAXATTEMPTS":"Maximale Anzahl an Versuchen", + "EXPIREWARNDAYS":"Ablauf Warnung nach Tagen", + "MAXAGEDAYS":"Maximale Gültigkeit in Tagen", + "USERLOGINMUSTBEDOMAIN":"Benutzer-Login muss eine Domain sein", + "ALLOWUSERNAMEPASSWORD":"Benutzername Password erlaubt", + "ALLOWEXTERNALIDP":"Externer IDP erlaubt", + "ALLOWREGISTER":"Registrieren erlaubt", + "ALLOWUSERNAMEPASSWORD_DESC":"Der konventionelle Login mit Benutzername und Passwort wird erlaubt.", + "ALLOWEXTERNALIDP_DESC":"Der Login wird für die darunter liegenden Identity Provider erlaubt.", + "ALLOWREGISTER_DESC":"Ist die Option gewählt, erscheint im Login ein zusätzlicher Schritt zum Registrieren eines Benutzers." + }, + "RESET":"Richtlinie zurücksetzen", + "CREATECUSTOM":"Benutzerdefinierte Richtlinie erstellen", + "TOAST":{ + "SET":"Richtline erfolgreich gesetzt!", + "RESETSUCCESS":"Richtline zurückgesetzt!" + } + }, "ORG_DETAIL": { "TITLE": "Organisation", "DESCRIPTION": "Hier kannst Du Deine Konfiguration der Organisation bearbeiten und Mitglieder verwalten.", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index eceaafb66..faa9343ae 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -350,10 +350,6 @@ "DELETE":"Remove", "DELETESUCCESS":"Failed events removed." }, - "POLICY": { - "TITLE":"Default policies for organisations", - "DESCRIPTION":"These settings can be enhanced and/or customized by registered organisations." - }, "TOAST":{ "MEMBERREMOVED":"Manager removed.", "MEMBERSADDED": "Managers added.", @@ -421,74 +417,6 @@ "TITLE":"Organisation Managers", "DESCRIPTION":"Define the users who can change your organisations preferences." }, - "POLICY": { - "TITLE":"Explore Policies", - "DESCRIPTION":"Pre-packaged policies that enhance your security.", - "PWD_COMPLEXITY": { - "TITLE":"Password Complexity", - "DESCRIPTION":"Ensures that all set passwords correspond to a specific pattern", - "TITLECREATE":"Create Password Complexity Policy", - "DESCRIPTIONCREATE":"Ensures that all set passwords correspond to a specific pattern", - "SYMBOLANDNUMBERERROR":"The password must consist of a digit and a symbol/punctuation mark.", - "SYMBOLERROR":"The password must include a symbol/punctuation mark.", - "NUMBERERROR":"The password must include a digit.", - "PATTERNERROR":"The password does not meet the required pattern." - }, - "PWD_AGE": { - "TITLE":"Password Aging", - "DESCRIPTION":"You can set a policy for the aging of passwords. This policy emits a warning after the specific aging time has elapsed.", - "TITLECREATE":"Create Password Aging Policy", - "DESCRIPTIONCREATE":"You can set a policy for the aging of passwords. This policy emits a warning after the specific aging time has elapsed." - }, - "PWD_LOCKOUT": { - "TITLE":"Password Lockout", - "DESCRIPTION":"Password retries are infinite in default mode. You have to apply this policy if you want to show the number of retries, or set a maximum number of retries after which the account will be blocked.", - "TITLECREATE":"Create Password Lockout Policy", - "DESCRIPTIONCREATE":"Password retries are infinite in default mode. You have to apply this policy if you want to show the number of retries, or set a maximum number of retries after which the account will be blocked." - }, - "IAM_POLICY": { - "TITLE":"IAM Access Preferences", - "DESCRIPTION":"Define access properties of your users.", - "TITLECREATE":"Set IAM Access Preferences", - "DESCRIPTIONCREATE":"If the property \"UserLoginMustBeDomain\" is enabled an e-mail address cannot be used as a user name." - }, - "LOGIN_POLICY": { - "TITLE":"Login Policy", - "DESCRIPTION":"Define how Users can be authenticated", - "TITLECREATE":"Define how Users can be authenticated", - "DESCRIPTIONCREATEADMIN":"Users can choose from the available identity providers below.", - "DESCRIPTIONCREATEMGMT":"Users can choose from the available identity providers below. Note: You can use System-set providers as well as providers set for your organisation only.", - "SAVED":"Saved successfully!" - }, - "DEFAULTLABEL":"The currently set guideline corresponds to the standard setting set by the IAM Administrator.", - "BTN_INSTALL":"Setup", - "BTN_EDIT":"Modify", - "DATA": { - "DESCRIPTION":"Description", - "MINLENGTH":"minimum length", - "HASNUMBER": "has number", - "HASSYMBOL": "has symbol", - "HASLOWERCASE": "has lowercase", - "HASUPPERCASE": "has uppercase", - "SHOWLOCKOUTFAILURES":"show lockout failures", - "MAXATTEMPTS":"Max Attempts", - "EXPIREWARNDAYS":"Expiration Warning after day", - "MAXAGEDAYS":"Max Age in days", - "USERLOGINMUSTBEDOMAIN":"User Login must be Domain", - "ALLOWUSERNAMEPASSWORD":"Username Password allowed", - "ALLOWEXTERNALIDP":"External IDP allowed", - "ALLOWREGISTER":"Register allowed", - "ALLOWUSERNAMEPASSWORD_DESC":"The conventional login with user name and password is allowed.", - "ALLOWEXTERNALIDP_DESC":"The login is allowed for the underlying identity providers", - "ALLOWREGISTER_DESC":"If the option is selected, an additional step for registering a user appears in the login." - }, - "RESET":"Reset Policy", - "CREATECUSTOM":"Create Custom Policy", - "TOAST":{ - "SET":"Policy set successfully!", - "RESETSUCCESS":"Policy reset successfully!" - } - }, "TOAST": { "DEACTIVATED":"Organisation deactivated.", "REACTIVATED":"Organisation reactivated.", @@ -500,6 +428,72 @@ "SETPRIMARY":"Primary domain set." } }, + "POLICY": { + "TITLE":"Explore Policies", + "DESCRIPTION":"Pre-packaged policies that enhance your security.", + "PWD_COMPLEXITY": { + "TITLE":"Password Complexity", + "DESCRIPTION":"Ensures that all set passwords correspond to a specific pattern", + "SYMBOLANDNUMBERERROR":"The password must consist of a digit and a symbol/punctuation mark.", + "SYMBOLERROR":"The password must include a symbol/punctuation mark.", + "NUMBERERROR":"The password must include a digit.", + "PATTERNERROR":"The password does not meet the required pattern." + }, + "PWD_AGE": { + "TITLE":"Password Aging", + "DESCRIPTION":"You can set a policy for the aging of passwords. This policy emits a warning after the specific aging time has elapsed." + }, + "PWD_LOCKOUT": { + "TITLE":"Password Lockout", + "DESCRIPTION":"Password retries are infinite in default mode. You have to apply this policy if you want to show the number of retries, or set a maximum number of retries after which the account will be blocked." + }, + "IAM_POLICY": { + "TITLE":"IAM Access Preferences", + "DESCRIPTION":"Define access properties of your users." + }, + "LOGIN_POLICY": { + "TITLE":"Login Policy", + "DESCRIPTION":"Define how Users can be authenticated", + "DESCRIPTIONCREATEADMIN":"Users can choose from the available identity providers below.", + "DESCRIPTIONCREATEMGMT":"Users can choose from the available identity providers below. Note: You can use System-set providers as well as providers set for your organisation only.", + "SAVED":"Saved successfully!" + }, + "LABEL": { + "TITLE":"Email Labelling Settings", + "DESCRIPTION":"Change the look of your emails.", + "PRIMARYCOLOR":"Background color", + "SECONDARYCOLOR":"Font color", + "SAVED":"Saved successfully" + }, + "DEFAULTLABEL":"The currently set guideline corresponds to the standard setting set by the IAM Administrator.", + "BTN_INSTALL":"Setup", + "BTN_EDIT":"Modify", + "DATA": { + "DESCRIPTION":"Description", + "MINLENGTH":"minimum length", + "HASNUMBER": "has number", + "HASSYMBOL": "has symbol", + "HASLOWERCASE": "has lowercase", + "HASUPPERCASE": "has uppercase", + "SHOWLOCKOUTFAILURES":"show lockout failures", + "MAXATTEMPTS":"Max Attempts", + "EXPIREWARNDAYS":"Expiration Warning after day", + "MAXAGEDAYS":"Max Age in days", + "USERLOGINMUSTBEDOMAIN":"User Login must be Domain", + "ALLOWUSERNAMEPASSWORD":"Username Password allowed", + "ALLOWEXTERNALIDP":"External IDP allowed", + "ALLOWREGISTER":"Register allowed", + "ALLOWUSERNAMEPASSWORD_DESC":"The conventional login with user name and password is allowed.", + "ALLOWEXTERNALIDP_DESC":"The login is allowed for the underlying identity providers", + "ALLOWREGISTER_DESC":"If the option is selected, an additional step for registering a user appears in the login." + }, + "RESET":"Reset Policy", + "CREATECUSTOM":"Create Custom Policy", + "TOAST":{ + "SET":"Policy set successfully!", + "RESETSUCCESS":"Policy reset successfully!" + } + }, "ORG_DETAIL": { "TITLE": "Organisation", "DESCRIPTION": "Here you can edit the configuration of your organisation and manage the members.",