2018-07-23 16:42:17 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
2018-09-18 18:27:14 +02:00
|
|
|
import { UserListComponent } from './components/user-list/user-list.component';
|
|
|
|
import { UserDetailComponent } from './components/user-detail/user-detail.component';
|
2018-09-18 18:27:14 +02:00
|
|
|
import { GroupListComponent } from './components/group-list/group-list.component';
|
2018-07-23 16:42:17 +02:00
|
|
|
|
2018-09-18 18:27:14 +02:00
|
|
|
const routes: Routes = [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: UserListComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'new',
|
|
|
|
component: UserDetailComponent
|
|
|
|
},
|
2018-09-18 18:27:14 +02:00
|
|
|
{
|
|
|
|
path: 'groups',
|
|
|
|
component: GroupListComponent
|
|
|
|
/**
|
|
|
|
* FIXME: CRITICAL:
|
|
|
|
* Refreshing the page, even while having the required permission, will navigate you back to "/"
|
|
|
|
* Makes developing protected areas impossible.
|
|
|
|
* Has the be (temporarily) removed if this page should be edited.
|
|
|
|
*/
|
|
|
|
// data: { basePerm: 'users.can_manage' }
|
|
|
|
},
|
2018-09-18 18:27:14 +02:00
|
|
|
{
|
|
|
|
path: ':id',
|
|
|
|
component: UserDetailComponent
|
|
|
|
}
|
|
|
|
];
|
2018-07-23 16:42:17 +02:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class UsersRoutingModule {}
|