Skip to content
Snippets Groups Projects
Commit 826db157 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

redirect user to home folder if he/she trise to access 'authenticated.index' route

parent 17de2004
No related branches found
No related tags found
No related merge requests found
...@@ -83,10 +83,12 @@ ...@@ -83,10 +83,12 @@
</div> </div>
<!--
{{#if @pagination }} {{#if @pagination }}
<Pagination <Pagination
@object={{@pagination}} @object={{@pagination}}
@node={{@node}} @node={{@node}}
@hint={{@hint}} /> @hint={{@hint}} />
{{/if}} {{/if}}
-->
</div> </div>
...@@ -24,4 +24,4 @@ export default class AuthenticatedController extends Controller { ...@@ -24,4 +24,4 @@ export default class AuthenticatedController extends Controller {
onSidebarToggle() { onSidebarToggle() {
this.expanded = !this.expanded; this.expanded = !this.expanded;
} }
} }
\ No newline at end of file
import { service } from '@ember/service';
import BaseRoute from 'papermerge/routes/base';
export default class IndexRoute extends BaseRoute {
/*
The sole purpose of this route is to redirect user
to 'home folder' when user try to access root url
*/
@service currentUser;
async model() {
this.transitionTo(
'authenticated.nodes',
this.currentUser.user.home_folder.get('id')
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment