Skip to content
Snippets Groups Projects
application.js 464 B
Newer Older
  • Learn to ignore specific revisions
  • import BaseRoute from 'papermerge/base/routing';
    import { inject as service } from '@ember/service';
    
    export default class ApplicationRoute extends BaseRoute {
      @service currentUser;
    
      async model() {
        if (this.currentUser.isAuthenticated) {
          console.log("ApplicationRoute: current user is authenticated");
          return this.currentUser.user.home_folder;
        }
      }
    
    Eugen Ciur's avatar
    Eugen Ciur committed
    
      setupController(controller, model) {
        controller.set('home_folder', model);
      }