mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
use django authentication instead of auth tokens.
This commit is contained in:
@@ -4,7 +4,6 @@ import { AppFrameComponent } from './components/app-frame/app-frame.component';
|
||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||
import { DocumentDetailComponent } from './components/document-detail/document-detail.component';
|
||||
import { DocumentListComponent } from './components/document-list/document-list.component';
|
||||
import { LoginComponent } from './components/login/login.component';
|
||||
import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component';
|
||||
import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component';
|
||||
import { LogsComponent } from './components/manage/logs/logs.component';
|
||||
@@ -12,25 +11,23 @@ import { SettingsComponent } from './components/manage/settings/settings.compone
|
||||
import { TagListComponent } from './components/manage/tag-list/tag-list.component';
|
||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||
import { SearchComponent } from './components/search/search.component';
|
||||
import { AuthGuardService } from './services/auth-guard.service';
|
||||
|
||||
const routes: Routes = [
|
||||
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||
{path: '', component: AppFrameComponent, children: [
|
||||
{path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'documents', component: DocumentListComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'view/:id', component: DocumentListComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'search', component: SearchComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'documents/:id', component: DocumentDetailComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'dashboard', component: DashboardComponent },
|
||||
{path: 'documents', component: DocumentListComponent },
|
||||
{path: 'view/:id', component: DocumentListComponent },
|
||||
{path: 'search', component: SearchComponent },
|
||||
{path: 'documents/:id', component: DocumentDetailComponent },
|
||||
|
||||
{path: 'tags', component: TagListComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'documenttypes', component: DocumentTypeListComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'correspondents', component: CorrespondentListComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'logs', component: LogsComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'settings', component: SettingsComponent, canActivate: [AuthGuardService] },
|
||||
{path: 'tags', component: TagListComponent },
|
||||
{path: 'documenttypes', component: DocumentTypeListComponent },
|
||||
{path: 'correspondents', component: CorrespondentListComponent },
|
||||
{path: 'logs', component: LogsComponent },
|
||||
{path: 'settings', component: SettingsComponent },
|
||||
]},
|
||||
|
||||
{path: 'login', component: LoginComponent },
|
||||
{path: '404', component: NotFoundComponent},
|
||||
{path: '**', redirectTo: '/404', pathMatch: 'full'}
|
||||
];
|
||||
|
Reference in New Issue
Block a user