content: $localize`Drag-and-drop documents here to start uploading or place them in the consume folder. You can also drag-and-drop documents anywhere on all other pages of the web app. Once you do, Paperless-ngx will start training its machine learning algorithms.`,
route: '/dashboard',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
placement: 'bottom',
enableBackdrop: true,
disableScrollToAnchor: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
route: '/documents?sort=created&reverse=1&page=1',
placement: 'bottom',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
content: $localize`Any combination of filters can be saved as a 'view' which can then be displayed on the dashboard and / or sidebar.`,
route: '/documents?sort=created&reverse=1&page=1',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
content: $localize`Tags, correspondents, document types and storage paths can all be managed using these pages. They can also be created from the document edit view.`,
route: '/tags',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
content: $localize`File Tasks shows you documents that have been consumed, are waiting to be, or may have failed during the process.`,
route: '/tasks',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
content: $localize`Check out the settings for various tweaks to the web app, toggle settings for saved views or setup e-mail checking.`,
route: '/settings',
enableBackdrop: true,
+ isOptional: true,
prevBtnTitle,
nextBtnTitle,
endBtnTitle,
import { Injectable } from '@angular/core'
import { PermissionsService } from '../services/permissions.service'
import { ToastService } from '../services/toast.service'
+import { TourService } from 'ngx-ui-tour-ng-bootstrap'
@Injectable()
export class PermissionsGuard implements CanActivate {
constructor(
private permissionsService: PermissionsService,
private router: Router,
- private toastService: ToastService
+ private toastService: ToastService,
+ private tourService: TourService
) {}
canActivate(
route.data.requiredPermission.type
)
) {
- this.toastService.showError(
- $localize`You don't have permissions to do that`
- )
+ // Check if tour is running 1 = TourState.ON
+ if (this.tourService.getStatus() !== 1) {
+ this.toastService.showError(
+ $localize`You don't have permissions to do that`
+ )
+ }
return this.router.parseUrl('/dashboard')
} else {
return true