diff --git a/console/src/app/modules/idp-create/idp-create.component.html b/console/src/app/modules/idp-create/idp-create.component.html index 1eabb4c0f..3f7f3a76b 100644 --- a/console/src/app/modules/idp-create/idp-create.component.html +++ b/console/src/app/modules/idp-create/idp-create.component.html @@ -55,7 +55,7 @@ {{ 'IDP.IDPDISPLAYNAMMAPPING' | translate }} - {{ 'IDP.MAPPINTFIELD.'+field | translate }} + {{ 'IDP.MAPPINGFIELD.'+field | translate }} @@ -63,7 +63,7 @@ {{ 'IDP.USERNAMEMAPPING' | translate }} - {{ 'IDP.MAPPINTFIELD.'+field | translate }} + {{ 'IDP.MAPPINGFIELD.'+field | translate }} diff --git a/console/src/app/modules/idp-table/idp-table.component.html b/console/src/app/modules/idp-table/idp-table.component.html index 286650b43..b7a7fa4a9 100644 --- a/console/src/app/modules/idp-table/idp-table.component.html +++ b/console/src/app/modules/idp-table/idp-table.component.html @@ -2,18 +2,15 @@ [emitRefreshOnPreviousRoutes]="['/iam/idp/create']" [timestamp]="idpResult?.details?.viewTimestamp" [selection]="selection">
- - - + add{{ 'ACTIONS.NEW' | translate }} @@ -31,7 +28,7 @@ google diff --git a/console/src/app/modules/idp-table/idp-table.component.scss b/console/src/app/modules/idp-table/idp-table.component.scss index 5246b0e27..593761d1b 100644 --- a/console/src/app/modules/idp-table/idp-table.component.scss +++ b/console/src/app/modules/idp-table/idp-table.component.scss @@ -1,4 +1,6 @@ - +.ar-button { + margin-right: .5rem; +} .table-wrapper { overflow: auto; width: 100%; diff --git a/console/src/app/modules/idp-table/idp-table.component.ts b/console/src/app/modules/idp-table/idp-table.component.ts index 3d3a8069b..eb4aaf546 100644 --- a/console/src/app/modules/idp-table/idp-table.component.ts +++ b/console/src/app/modules/idp-table/idp-table.component.ts @@ -110,34 +110,6 @@ export class IdpTableComponent implements OnInit { }); } - public removeSelectedIdps(): void { - const dialogRef = this.dialog.open(WarnDialogComponent, { - data: { - confirmKey: 'ACTIONS.DELETE', - cancelKey: 'ACTIONS.CANCEL', - titleKey: 'IDP.DELETE_SELECTION_TITLE', - descriptionKey: 'IDP.DELETE_SELECTION_DESCRIPTION', - }, - width: '400px', - }); - - dialogRef.afterClosed().subscribe(resp => { - if (resp) { - this.selection.clear(); - Promise.all(this.selection.selected.map(value => { - if (this.serviceType === PolicyComponentServiceType.MGMT) { - return (this.service as ManagementService).removeOrgIDP(value.id); - } else { - return (this.service as AdminService).removeIDP(value.id); - } - })).then(() => { - this.toast.showInfo('IDP.TOAST.SELECTEDDEACTIVATED', true); - this.refreshPage(); - }); - } - }); - } - public removeIdp(idp: IDP.AsObject): void { const dialogRef = this.dialog.open(WarnDialogComponent, { data: { @@ -153,17 +125,21 @@ export class IdpTableComponent implements OnInit { if (resp) { if (this.serviceType === PolicyComponentServiceType.MGMT) { (this.service as ManagementService).removeOrgIDP(idp.id).then(() => { - this.toast.showInfo('IDP.TOAST.REMOVED', true); + this.toast.showInfo('IDP.TOAST.DELETED', true); setTimeout(() => { this.refreshPage(); }, 1000); + }, error => { + this.toast.showError(error); }); } else { (this.service as AdminService).removeIDP(idp.id).then(() => { - this.toast.showInfo('IDP.TOAST.REMOVED', true); + this.toast.showInfo('IDP.TOAST.DELETED', true); setTimeout(() => { this.refreshPage(); }, 1000); + }, error => { + this.toast.showError(error); }); } } @@ -177,6 +153,7 @@ export class IdpTableComponent implements OnInit { (this.service as ManagementService).listOrgIDPs(limit, offset).then(resp => { this.idpResult = resp; this.dataSource.data = resp.resultList; + console.log(resp.resultList); this.loadingSubject.next(false); }).catch(error => { this.toast.showError(error); @@ -186,6 +163,8 @@ export class IdpTableComponent implements OnInit { (this.service as AdminService).listIDPs(limit, offset).then(resp => { this.idpResult = resp; this.dataSource.data = resp.resultList; + console.log(resp.resultList); + this.loadingSubject.next(false); }).catch(error => { this.toast.showError(error); diff --git a/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.html b/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.html index 0872b9f34..03cfaf280 100644 --- a/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.html +++ b/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.html @@ -8,7 +8,7 @@ {{ 'IDP.TYPE' | translate }} - {{ 'IDP.TYPES.'+type | translate}} + {{ 'IDP.OWNERTYPES.'+type | translate}} 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 e3b3c9447..074251c7d 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 @@ -105,8 +105,9 @@ *ngIf="idp.stylingType == IDPStylingType.STYLING_TYPE_GOOGLE" alt="google" />
{{idp.name}} - {{ 'IDP.TYPE' | translate }}: {{ 'IDP.TYPES.'+idp.type | translate }} - {{ 'IDP.ID' | translate }}: {{idp.idpConfigId}} + {{ 'IDP.TYPE' | translate }}: {{ 'IDP.OWNERTYPES.'+idp.idpType | translate + }} + {{ 'IDP.ID' | translate }}: {{idp.idpId}}
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 28e99e89c..3b49f0e80 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 @@ -9,7 +9,7 @@ import { UpdateLoginPolicyRequest, UpdateLoginPolicyResponse, } from 'src/app/proto/generated/zitadel/admin_pb'; -import { IDP, IDPLoginPolicyLink, IDPStylingType } from 'src/app/proto/generated/zitadel/idp_pb'; +import { IDP, IDPLoginPolicyLink, IDPOwnerType, IDPStylingType } from 'src/app/proto/generated/zitadel/idp_pb'; import { AddCustomLoginPolicyRequest, GetLoginPolicyResponse as MgmtGetLoginPolicyResponse, @@ -101,6 +101,7 @@ export class LoginPolicyComponent implements OnDestroy { }); this.getIdps().then(resp => { this.idps = resp; + console.log(resp); }); } @@ -199,7 +200,7 @@ export class LoginPolicyComponent implements OnDestroy { dialogRef.afterClosed().subscribe(resp => { if (resp && resp.idp) { - this.addIdp(resp.idp).then(() => { + this.addIdp(resp.idp, resp.type).then(() => { this.loading = true; setTimeout(() => { this.fetchData(); @@ -211,10 +212,12 @@ export class LoginPolicyComponent implements OnDestroy { }); } - private addIdp(idp: IDP.AsObject | IDP.AsObject): Promise { + private addIdp(idp: IDP.AsObject | IDP.AsObject, ownerType?: IDPOwnerType): Promise { switch (this.serviceType) { case PolicyComponentServiceType.MGMT: - return (this.service as ManagementService).addIDPToLoginPolicy(idp.id); + if (ownerType) { + return (this.service as ManagementService).addIDPToLoginPolicy(idp.id, ownerType); + } case PolicyComponentServiceType.ADMIN: return (this.service as AdminService).addIDPToLoginPolicy(idp.id); } @@ -228,6 +231,8 @@ export class LoginPolicyComponent implements OnDestroy { if (index > -1) { this.idps.splice(index, 1); } + }, error => { + this.toast.showError(error); }); break; case PolicyComponentServiceType.ADMIN: @@ -236,6 +241,8 @@ export class LoginPolicyComponent implements OnDestroy { if (index > -1) { this.idps.splice(index, 1); } + }, error => { + this.toast.showError(error); }); break; } diff --git a/console/src/app/modules/user-grants/user-grants.component.ts b/console/src/app/modules/user-grants/user-grants.component.ts index 8b737fb38..cec488b39 100644 --- a/console/src/app/modules/user-grants/user-grants.component.ts +++ b/console/src/app/modules/user-grants/user-grants.component.ts @@ -174,8 +174,8 @@ export class UserGrantsComponent implements OnInit, AfterViewInit { public loadGrantOptions(grant: UserGrant.AsObject): void { this.grantToEdit = grant.grantId; - if (grant.grantId && grant.projectId) { - this.getGrantRoleOptions(grant.grantId, grant.projectId); + if (grant.projectGrantId && grant.projectId) { + this.getGrantRoleOptions(grant.projectGrantId, grant.projectId); } else if (grant.projectId) { this.getProjectRoleOptions(grant.projectId); } diff --git a/console/src/app/pages/orgs/org-create/org-create.component.html b/console/src/app/pages/orgs/org-create/org-create.component.html index 5a89bc227..d8e6b88c8 100644 --- a/console/src/app/pages/orgs/org-create/org-create.component.html +++ b/console/src/app/pages/orgs/org-create/org-create.component.html @@ -6,7 +6,8 @@ - + Use your personal account as organisation owner diff --git a/console/src/app/pages/projects/granted-projects/granted-projects.component.scss b/console/src/app/pages/projects/granted-projects/granted-projects.component.scss index 6ba509e9b..68a71d2fb 100644 --- a/console/src/app/pages/projects/granted-projects/granted-projects.component.scss +++ b/console/src/app/pages/projects/granted-projects/granted-projects.component.scss @@ -5,6 +5,7 @@ h1 { .sub { color: var(--grey); margin-bottom: 2rem; + font-size: 14px; } .max-width-container { diff --git a/console/src/app/pages/projects/owned-projects/owned-project-detail/project-grants/project-grants.component.html b/console/src/app/pages/projects/owned-projects/owned-project-detail/project-grants/project-grants.component.html index e76f6d145..131c6bc32 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-detail/project-grants/project-grants.component.html +++ b/console/src/app/pages/projects/owned-projects/owned-project-detail/project-grants/project-grants.component.html @@ -35,22 +35,22 @@ {{ 'PROJECT.GRANT.GRANTEDORG' | translate }} - {{grant.grantedOrgName}} {{ 'PROJECT.GRANT.DATES' | translate }} -
{{ 'PROJECT.GRANT.CREATIONDATE' | translate }}: - {{grant.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }} + {{grant.details.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}
{{ 'PROJECT.GRANT.CHANGEDATE' | translate }} - {{grant.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }} + {{grant.details.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}
diff --git a/console/src/app/pages/projects/owned-projects/owned-projects.component.scss b/console/src/app/pages/projects/owned-projects/owned-projects.component.scss index 6ba509e9b..68a71d2fb 100644 --- a/console/src/app/pages/projects/owned-projects/owned-projects.component.scss +++ b/console/src/app/pages/projects/owned-projects/owned-projects.component.scss @@ -5,6 +5,7 @@ h1 { .sub { color: var(--grey); margin-bottom: 2rem; + font-size: 14px; } .max-width-container { diff --git a/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts b/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts index c1afca6bc..d1e9516a8 100644 --- a/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts +++ b/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts @@ -106,7 +106,7 @@ export class ProjectGrantDetailComponent { updateRoles(selectionChange: MatSelectChange): void { this.mgmtService.updateProjectGrant(this.grant.grantId, this.grant.projectId, selectionChange.value) .then(() => { - this.toast.showInfo('PROJECT.TOAST.GRANTUPDATED'); + this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUPDATED', true); }).catch(error => { this.toast.showError(error); }); diff --git a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html index 424cc9854..fdbfea6e4 100644 --- a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html +++ b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html @@ -19,7 +19,7 @@ {{ 'USER.EXTERNALIDP.IDPCONFIGID' | translate }} - {{idp?.idpConfigId}} + {{idp?.idpId}} diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts index 7fbcb7a05..2d68b3e21 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts @@ -52,6 +52,7 @@ export class UserDetailComponent implements OnInit { this.mgmtUserService.getUserByID(id).then(resp => { if (resp.user) { this.user = resp.user; + console.log(this.user); } }).catch(err => { console.error(err); @@ -158,6 +159,7 @@ export class UserDetailComponent implements OnInit { this.mgmtUserService.updateHumanEmail(this.user.id, email).then(() => { this.toast.showInfo('USER.TOAST.EMAILSAVED', true); if (this.user.state == UserState.USER_STATE_INITIAL) { + console.log('init'); this.mgmtUserService.resendHumanInitialization(this.user.id, email ?? '').then(() => { this.toast.showInfo('USER.TOAST.INITEMAILSENT', true); this.refreshChanges$.emit(); diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index b8700aa25..31136453d 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -5,6 +5,7 @@ import { BehaviorSubject } from 'rxjs'; import { AppQuery } from '../proto/generated/zitadel/app_pb'; import { KeyType } from '../proto/generated/zitadel/auth_n_key_pb'; +import { IDPOwnerType } from '../proto/generated/zitadel/idp_pb'; import { AddAPIAppRequest, AddAPIAppResponse, @@ -387,9 +388,10 @@ export class ManagementService { return this.grpcService.mgmt.resetLoginPolicyToDefault(req, null).then(resp => resp.toObject()); } - public addIDPToLoginPolicy(idpId: string): Promise { + public addIDPToLoginPolicy(idpId: string, ownerType: IDPOwnerType): Promise { const req = new AddIDPToLoginPolicyRequest(); req.setIdpId(idpId); + req.setOwnertype(ownerType); return this.grpcService.mgmt.addIDPToLoginPolicy(req, null).then(resp => resp.toObject()); } diff --git a/console/src/assets/environment.json b/console/src/assets/environment.json index 000ad04f1..9f45116c2 100644 --- a/console/src/assets/environment.json +++ b/console/src/assets/environment.json @@ -3,5 +3,5 @@ "mgmtServiceUrl": "https://api.zitadel.io", "adminServiceUrl":"https://api.zitadel.io", "issuer": "https://issuer.zitadel.io", - "clientid": "100129365194565743@zitadel" + "clientid": "100851239960569938@zitadel" } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index c5fdf93c0..78716231b 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -775,7 +775,8 @@ "PROJECTGRANTCHANGED":"Projektberechtigung geändert.", "PROJECTGRANTMEMBERADDED":"Berechtigungsmanager hinzugefügt.", "PROJECTGRANTMEMBERCHANGED":"Berechtigungsmanager verändert.", - "PROJECTGRANTMEMBERREMOVED":"Berechtigungsmanager entfernt." + "PROJECTGRANTMEMBERREMOVED":"Berechtigungsmanager entfernt.", + "PROJECTGRANTUPDATED":"Projectberechtigung geändert." }, "ROLES":"Projektrollen" }, diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index 5f0c1ac98..04c738f0a 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -773,7 +773,8 @@ "PROJECTGRANTCHANGED":"Project grant changed.", "PROJECTGRANTMEMBERADDED":"Grant manager added.", "PROJECTGRANTMEMBERCHANGED":"Grant manager changed.", - "PROJECTGRANTMEMBERREMOVED":"Grant manager removed." + "PROJECTGRANTMEMBERREMOVED":"Grant manager removed.", + "PROJECTGRANTUPDATED":"Project Grant updated" }, "ROLES":"Project Roles" },