mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix(console): application state, add project role bulk, user grant explanations, i18n, ngsw update prompt #341
This commit is contained in:
parent
7b67b55f4e
commit
73a4b7baef
@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
<mat-menu #menu="matMenu">
|
<mat-menu #menu="matMenu">
|
||||||
<mat-progress-bar *ngIf="orgLoading" color="accent" mode="indeterminate"></mat-progress-bar>
|
<mat-progress-bar *ngIf="orgLoading" color="accent" mode="indeterminate"></mat-progress-bar>
|
||||||
<button class="show-all" mat-menu-item [routerLink]="[ '/org/overview' ]">Show all organizations</button>
|
<button class="show-all" mat-menu-item
|
||||||
|
[routerLink]="[ '/org/overview' ]">{{'MENU.SHOWORGS' | translate}}</button>
|
||||||
|
|
||||||
<button [ngClass]="{'active': temporg.id === org?.id}" [disabled]="!temporg.id" *ngFor="let temporg of orgs"
|
<button [ngClass]="{'active': temporg.id === org?.id}" [disabled]="!temporg.id" *ngFor="let temporg of orgs"
|
||||||
mat-menu-item (click)="setActiveOrg(temporg)">
|
mat-menu-item (click)="setActiveOrg(temporg)">
|
||||||
|
@ -144,13 +144,13 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
public changeState(event: MatButtonToggleChange): void {
|
public changeState(event: MatButtonToggleChange): void {
|
||||||
if (event.value === AppState.APPSTATE_ACTIVE) {
|
if (event.value === AppState.APPSTATE_ACTIVE) {
|
||||||
this.projectService.ReactivateApplication(this.app.id).then(() => {
|
this.projectService.ReactivateApplication(this.projectId, this.app.id).then(() => {
|
||||||
this.toast.showInfo('Reactivated Application');
|
this.toast.showInfo('Reactivated Application');
|
||||||
}).catch((error: any) => {
|
}).catch((error: any) => {
|
||||||
this.toast.showError(error.message);
|
this.toast.showError(error.message);
|
||||||
});
|
});
|
||||||
} else if (event.value === AppState.APPSTATE_INACTIVE) {
|
} else if (event.value === AppState.APPSTATE_INACTIVE) {
|
||||||
this.projectService.DectivateApplication(this.app.id).then(() => {
|
this.projectService.DeactivateApplication(this.projectId, this.app.id).then(() => {
|
||||||
this.toast.showInfo('Deactivated Application');
|
this.toast.showInfo('Deactivated Application');
|
||||||
}).catch((error: any) => {
|
}).catch((error: any) => {
|
||||||
this.toast.showError(error.message);
|
this.toast.showError(error.message);
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
|
|
||||||
<ng-container *ngIf="currentCreateStep === 1">
|
<ng-container *ngIf="currentCreateStep === 1">
|
||||||
<h1>{{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}}</h1>
|
<h1>{{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}}</h1>
|
||||||
|
<p>{{'PROJECT.GRANT.CREATE.SEL_ORG_DESC' | translate}}</p>
|
||||||
|
|
||||||
<form (ngSubmit)="searchOrg(domain.value)">
|
<form (ngSubmit)="searchOrg(domain.value)">
|
||||||
<mat-form-field class="org-domain">
|
<mat-form-field class="org-domain">
|
||||||
<mat-label>{{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}}</mat-label>
|
<mat-label>{{'PROJECT.GRANT.CREATE.SEL_ORG_FORMFIELD' | translate}}</mat-label>
|
||||||
<input #domain matInput />
|
<input #domain matInput />
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
@ -84,12 +84,15 @@ export class ProjectRoleCreateComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public addRole(): void {
|
public addRole(): void {
|
||||||
const promises = this.formArray.value.map((role: ProjectRoleAdd.AsObject) => {
|
const rolesToAdd: ProjectRoleAdd[] = this.formArray.value.map((element: any) => {
|
||||||
role.id = this.projectId;
|
const role = new ProjectRoleAdd();
|
||||||
return this.projectService.AddProjectRole(role);
|
role.setKey(element.key);
|
||||||
|
role.setDisplayName(element.displayName);
|
||||||
|
role.setGroup(element.group);
|
||||||
|
return role;
|
||||||
});
|
});
|
||||||
|
|
||||||
Promise.all(promises).then(() => {
|
this.projectService.BulkAddProjectRole(this.projectId, rolesToAdd).then(() => {
|
||||||
this.router.navigate(['projects', this.projectId]);
|
this.router.navigate(['projects', this.projectId]);
|
||||||
}).catch(data => {
|
}).catch(data => {
|
||||||
this.toast.showError(data.message);
|
this.toast.showError(data.message);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="filter && filter == UserGrantSearchKey.USERGRANTSEARCHKEY_PROJECT_ID">
|
<ng-container *ngIf="filter && filter == UserGrantSearchKey.USERGRANTSEARCHKEY_PROJECT_ID">
|
||||||
<h1>{{'PROJECT.GRANT.CREATE.SEL_PROJECT' | translate}}</h1>
|
<h1>{{'PROJECT.GRANT.CREATE.SEL_USER' | translate}}</h1>
|
||||||
|
|
||||||
<app-search-user-autocomplete class="block" singleOutput="true" (selectionChanged)="selectUser($event)">
|
<app-search-user-autocomplete class="block" singleOutput="true" (selectionChanged)="selectUser($event)">
|
||||||
</app-search-user-autocomplete>
|
</app-search-user-autocomplete>
|
||||||
|
@ -297,9 +297,11 @@ export class ProjectService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async ReactivateApplication(appId: string): Promise<Application> {
|
public async ReactivateApplication(projectId: string, appId: string): Promise<Application> {
|
||||||
const req = new ApplicationID();
|
const req = new ApplicationID();
|
||||||
req.setId(appId);
|
req.setId(appId);
|
||||||
|
req.setProjectId(projectId);
|
||||||
|
|
||||||
return await this.request(
|
return await this.request(
|
||||||
c => c.reactivateApplication,
|
c => c.reactivateApplication,
|
||||||
req,
|
req,
|
||||||
@ -307,9 +309,11 @@ export class ProjectService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async DectivateApplication(projectId: string): Promise<Application> {
|
public async DeactivateApplication(projectId: string, appId: string): Promise<Application> {
|
||||||
const req = new ApplicationID();
|
const req = new ApplicationID();
|
||||||
req.setId(projectId);
|
req.setId(appId);
|
||||||
|
req.setProjectId(projectId);
|
||||||
|
|
||||||
return await this.request(
|
return await this.request(
|
||||||
c => c.deactivateApplication,
|
c => c.deactivateApplication,
|
||||||
req,
|
req,
|
||||||
|
@ -2,12 +2,13 @@ import { Injectable } from '@angular/core';
|
|||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { SwUpdate } from '@angular/service-worker';
|
import { SwUpdate } from '@angular/service-worker';
|
||||||
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class UpdateService {
|
export class UpdateService {
|
||||||
constructor(private swUpdate: SwUpdate, snackbar: MatSnackBar) {
|
constructor(private swUpdate: SwUpdate, snackbar: MatSnackBar) {
|
||||||
|
this.swUpdate.checkForUpdate();
|
||||||
|
|
||||||
this.swUpdate.available.subscribe((evt) => {
|
this.swUpdate.available.subscribe((evt) => {
|
||||||
const snack = snackbar.open('Update Available', 'Reload');
|
const snack = snackbar.open('Update Available', 'Reload');
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
"USER": "Benutzer",
|
"USER": "Benutzer",
|
||||||
"LOGOUT": "abmelden",
|
"LOGOUT": "abmelden",
|
||||||
"NEWORG":"Neue Organisation",
|
"NEWORG":"Neue Organisation",
|
||||||
"IAMADMIN":"Sie sind ein IAM Administrator. Sie haben erweiterte Berechtigungen!"
|
"IAMADMIN":"Sie sind ein IAM Administrator. Sie haben erweiterte Berechtigungen!",
|
||||||
|
"SHOWORGS":"Alle organisationen anzeigen"
|
||||||
},
|
},
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"SAVE": "speichern",
|
"SAVE": "speichern",
|
||||||
@ -355,17 +356,20 @@
|
|||||||
"USERID":"User Id"
|
"USERID":"User Id"
|
||||||
},
|
},
|
||||||
"GRANT": {
|
"GRANT": {
|
||||||
"TITLE": "Grants",
|
"TITLE": "Berechtigte Organisationen",
|
||||||
"DESCRIPTION": "Gewähren Sie einer anderen Organisation Zugriff (Grant) auf dieses Projekt",
|
"DESCRIPTION": "Gewähren Sie einer anderen Organisation Zugriff (Grant) auf dieses Projekt",
|
||||||
"CREATE": {
|
"CREATE": {
|
||||||
"TITLE": "Member Grant erstellen",
|
"TITLE": "Organisation berechtigen",
|
||||||
"SEL_USERS": "Selektieren Sie die gewünschten User für das Erstellen des Grants!",
|
"SEL_USERS": "Selektieren Sie die gewünschten User für das Erstellen des Grants!",
|
||||||
"SEL_ROLES": "Selektieren Sie die gewünschten Rollen für das Erstellen des Grants!",
|
"SEL_ROLES": "Selektieren Sie die gewünschten Rollen für das Erstellen des Grants!",
|
||||||
"SEL_PROJECT": "Suchen Sie nach dem Projekt",
|
"SEL_PROJECT": "Suchen Sie nach dem Projekt",
|
||||||
|
"SEL_USER":"Suchen Sie nach einem User",
|
||||||
"SEL_ORG": "Suchen Sie nach der Domain",
|
"SEL_ORG": "Suchen Sie nach der Domain",
|
||||||
|
"SEL_ORG_DESC":"Geben Sie die vollständige Domain ein um Resultate zu erhalten!",
|
||||||
"ORG_TITLE":"Organisation",
|
"ORG_TITLE":"Organisation",
|
||||||
"ORG_DESCRIPTION":"Sie sind im Begriff einen Nutzer für die Organisation {{name}} zu berechtigen",
|
"ORG_DESCRIPTION":"Sie sind im Begriff einen Nutzer für die Organisation {{name}} zu berechtigen",
|
||||||
"ORG_DESCRIPTION_DESC":"Wechseln Sie den Context um die Organisation zu wechseln!",
|
"ORG_DESCRIPTION_DESC":"Wechseln Sie den Context um die Organisation zu wechseln!",
|
||||||
|
"SEL_ORG_FORMFIELD":"Vollständige Domain",
|
||||||
"SEL_ORG_BUTTON": "Suche Organisation",
|
"SEL_ORG_BUTTON": "Suche Organisation",
|
||||||
"FOR_ORG":"The grant wird erstellt für:"
|
"FOR_ORG":"The grant wird erstellt für:"
|
||||||
},
|
},
|
||||||
@ -377,7 +381,7 @@
|
|||||||
"USER":"Benutzer",
|
"USER":"Benutzer",
|
||||||
"MEMBERS":"Managers",
|
"MEMBERS":"Managers",
|
||||||
"PROJECTNAME":"Projekt Name",
|
"PROJECTNAME":"Projekt Name",
|
||||||
"GRANTEDORG": "Granted Organization",
|
"GRANTEDORG": "Granted Organisation",
|
||||||
"GRANTEDORGDOMAIN": "Domain",
|
"GRANTEDORGDOMAIN": "Domain",
|
||||||
"GRANTEDORGNAME":"Org Name",
|
"GRANTEDORGNAME":"Org Name",
|
||||||
"CREATIONDATE": "Erstelldatum",
|
"CREATIONDATE": "Erstelldatum",
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
"USER": "Users",
|
"USER": "Users",
|
||||||
"LOGOUT": "Log out",
|
"LOGOUT": "Log out",
|
||||||
"NEWORG":"New Organization",
|
"NEWORG":"New Organization",
|
||||||
"IAMADMIN":"You are an IAM Administrator. Note that you have enhanced permissions!"
|
"IAMADMIN":"You are an IAM Administrator. Note that you have enhanced permissions!",
|
||||||
|
"SHOWORGS":"Show all organizations"
|
||||||
},
|
},
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"SAVE": "Save",
|
"SAVE": "Save",
|
||||||
@ -284,7 +285,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ORG_DETAIL": {
|
"ORG_DETAIL": {
|
||||||
"TITLE": "Organisation",
|
"TITLE": "Organization",
|
||||||
"DESCRIPTION": "Here you can edit your organization configuration and manage members",
|
"DESCRIPTION": "Here you can edit your organization configuration and manage members",
|
||||||
"DETAIL": {
|
"DETAIL": {
|
||||||
"TITLE": "Detail",
|
"TITLE": "Detail",
|
||||||
@ -356,18 +357,21 @@
|
|||||||
"USERID":"User Id"
|
"USERID":"User Id"
|
||||||
},
|
},
|
||||||
"GRANT": {
|
"GRANT": {
|
||||||
"TITLE": "Grants",
|
"TITLE": "Granted organizations",
|
||||||
"DESCRIPTION": "Allow an other organization to use your project",
|
"DESCRIPTION": "Allow an other organization to use your project",
|
||||||
"CREATE": {
|
"CREATE": {
|
||||||
"TITLE": "Create Member Grant",
|
"TITLE": "Create organization grant",
|
||||||
"SEL_USERS": "Select the users you wish to grant",
|
"SEL_USERS": "Select the users you wish to grant",
|
||||||
"SEL_PROJECT": "Search for a project",
|
"SEL_PROJECT": "Search for a project",
|
||||||
"SEL_ROLES": "Select the roles you want to be added to the grant",
|
"SEL_ROLES": "Select the roles you want to be added to the grant",
|
||||||
"SEL_ORG": "Search for the domain",
|
"SEL_USER":"Search for a user",
|
||||||
|
"SEL_ORG": "Set the domain",
|
||||||
|
"SEL_ORG_DESC":"Enter the complete domain to specify the organization to grant!",
|
||||||
"ORG_TITLE":"Organization",
|
"ORG_TITLE":"Organization",
|
||||||
"ORG_DESCRIPTION":"You are about to grant a user for the organization {{name}}",
|
"ORG_DESCRIPTION":"You are about to grant a user for the organization {{name}}",
|
||||||
"ORG_DESCRIPTION_DESC":"Switch the context in the header above to grant a user for another organization",
|
"ORG_DESCRIPTION_DESC":"Switch the context in the header above to grant a user for another organization",
|
||||||
"SEL_ORG_BUTTON": "Search Organization",
|
"SEL_ORG_FORMFIELD":"Complete Domain",
|
||||||
|
"SEL_ORG_BUTTON": "Set Organization",
|
||||||
"FOR_ORG":"The grant is created for:"
|
"FOR_ORG":"The grant is created for:"
|
||||||
},
|
},
|
||||||
"DETAIL": {
|
"DETAIL": {
|
||||||
@ -563,7 +567,7 @@
|
|||||||
"org.domain.primary.set":"set primary domain",
|
"org.domain.primary.set":"set primary domain",
|
||||||
"org.domain.removed":"domain removed",
|
"org.domain.removed":"domain removed",
|
||||||
"org.iam.policy.added":"IAM policy added",
|
"org.iam.policy.added":"IAM policy added",
|
||||||
"project.added": "added",
|
"project.added": "project added",
|
||||||
"project.changed":"changed",
|
"project.changed":"changed",
|
||||||
"project.deactivated":"deactivated",
|
"project.deactivated":"deactivated",
|
||||||
"project.member.added":"added member",
|
"project.member.added":"added member",
|
||||||
|
Loading…
Reference in New Issue
Block a user