mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 12:28:46 +00:00
fix(console): cleanup structure, role guard, paginated requests, cleanup policies, toast i18n, view timestamp, preloading strategy, maennchenfindings, fix passwordchange (#483)
* routes, move grid to list comopnent * rename app list component, move to project sub * add owned-project-detail child module * seperate pipes * set password validators only if needed * create org initialize without pwd * no caps * self xss message * fix user table * fix project member paginator * fix project members pagination, user grant pag * move project grants, fix imports * fix owned project detail imports * use pipe and directives * ng content bindings, rem custom schemas * i18n, fix error toast parameter * toast i18n * side background * fix: sequence, add timestamp * audit * fix metanav background * org domain label * cleanup policy component * shorten user grant roles, mk cols visible as bind * move user components, show otp only if available * preload modules * fix password change * fix org create buttons * class css
This commit is contained in:
@@ -50,19 +50,11 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
this.grantId = grantid;
|
||||
this.userId = userid;
|
||||
|
||||
console.log('usergrantcreate');
|
||||
|
||||
// if (this.userId) {
|
||||
// this.context = UserGrantContext.USER;
|
||||
// } else
|
||||
|
||||
if (this.projectId && !this.grantId) {
|
||||
this.context = UserGrantContext.OWNED_PROJECT;
|
||||
} else if (this.projectId && this.grantId) {
|
||||
this.context = UserGrantContext.GRANTED_PROJECT;
|
||||
console.log(this.grantId, this.projectId);
|
||||
this.projectService.GetGrantedProjectByID(this.projectId, this.grantId).then(resp => {
|
||||
console.log(resp.toObject());
|
||||
this.grantRolesKeyList = resp.toObject().roleKeysList;
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
@@ -81,25 +73,13 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
|
||||
public addGrant(): void {
|
||||
switch (this.context) {
|
||||
// case UserGrantContext.USER:
|
||||
// this.userService.CreateUserGrant(
|
||||
// this.projectId,
|
||||
// this.userId,
|
||||
// this.rolesList,
|
||||
// ).then((data: UserGrant) => {
|
||||
// this.toast.showInfo('User Grant added');
|
||||
// this.close();
|
||||
// }).catch(error => {
|
||||
// this.toast.showError(error);
|
||||
// });
|
||||
// break;
|
||||
case UserGrantContext.OWNED_PROJECT:
|
||||
this.userService.CreateProjectUserGrant(
|
||||
this.projectId,
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
).then((data: UserGrant) => {
|
||||
this.toast.showInfo('Project User Grant added');
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTADDED', true);
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
@@ -113,13 +93,12 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
).then((data: UserGrant) => {
|
||||
this.toast.showInfo('Project Grant User Grant added');
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUSERGRANTADDED', true);
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
SearchProjectAutocompleteModule,
|
||||
} from 'src/app/modules/search-project-autocomplete/search-project-autocomplete.module';
|
||||
import { SearchUserAutocompleteModule } from 'src/app/modules/search-user-autocomplete/search-user-autocomplete.module';
|
||||
import { SharedModule } from 'src/app/modules/shared/shared.module';
|
||||
|
||||
import { ProjectRolesModule } from '../../modules/project-roles/project-roles.module';
|
||||
import { UserGrantCreateRoutingModule } from './user-grant-create-routing.module';
|
||||
@@ -31,9 +32,7 @@ import { UserGrantCreateComponent } from './user-grant-create.component';
|
||||
SearchProjectAutocompleteModule,
|
||||
SearchUserAutocompleteModule,
|
||||
ProjectRolesModule,
|
||||
],
|
||||
schemas: [
|
||||
CUSTOM_ELEMENTS_SCHEMA,
|
||||
SharedModule,
|
||||
],
|
||||
})
|
||||
export class UserGrantCreateModule { }
|
||||
|
||||
Reference in New Issue
Block a user