mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 10:25:11 +00:00
feat: rehauled console (#3525)
* new console * move npm ci to angular build * rel path for assets * local grpc copy * login policy, rm clear views, features rel path * lock Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
00f7dbe875
commit
08ae39ae19
@@ -0,0 +1,76 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AuthGuard } from 'src/app/guards/auth.guard';
|
||||
import { RoleGuard } from 'src/app/guards/role.guard';
|
||||
import { UserGuard } from 'src/app/guards/user.guard';
|
||||
import { Type } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
|
||||
import { AuthUserDetailComponent } from './user-detail/auth-user-detail/auth-user-detail.component';
|
||||
import { PasswordComponent } from './user-detail/password/password.component';
|
||||
import { UserDetailComponent } from './user-detail/user-detail/user-detail.component';
|
||||
import { UserListComponent } from './user-list/user-list.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: UserListComponent,
|
||||
data: {
|
||||
animation: 'HomePage',
|
||||
type: Type.TYPE_HUMAN,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
loadChildren: () => import('./user-create/user-create.module').then((m) => m.UserCreateModule),
|
||||
canActivate: [AuthGuard, RoleGuard],
|
||||
data: {
|
||||
roles: ['user.write'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'create-machine',
|
||||
loadChildren: () => import('./user-create-machine/user-create-machine.module').then((m) => m.UserCreateMachineModule),
|
||||
canActivate: [AuthGuard, RoleGuard],
|
||||
data: {
|
||||
roles: ['user.write'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'me',
|
||||
component: AuthUserDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
animation: 'HomePage',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'me/password',
|
||||
component: PasswordComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: { animation: 'AddPage' },
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: UserDetailComponent,
|
||||
canActivate: [AuthGuard, UserGuard, RoleGuard],
|
||||
data: {
|
||||
roles: ['user.read'],
|
||||
animation: 'HomePage',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ':id/password',
|
||||
component: PasswordComponent,
|
||||
canActivate: [AuthGuard, RoleGuard],
|
||||
data: {
|
||||
roles: ['user.write'],
|
||||
animation: 'AddPage',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class UsersRoutingModule {}
|
||||
Reference in New Issue
Block a user