<commit_before>Router.configure({
  layoutTemplate: 'layout',
});

Router.onBeforeAction(function() {
        var currentUser = Meteor.userId();
        var currentRoute = Router.current().route.getName();

        if(currentUser) {
            console.log("GLOBAL::onBeforeAction:logged:", currentRoute);
            this.next();
        } else {
            console.log("GLOBAL::onBeforeAction:NOTlogged:", currentRoute);
            console.log("should render login");
            // this.render("login");
            this.next();
        }
    },
    {
        // except: [
        //             'home',
        //             'register',
        //             'login',
        //             'application'
        //         ]
        only: ['backoffice']
    }
);


Router.route('/', {
    name: 'home'
});

Router.route('/application/success', {
    name: 'application.success'
});

Router.route('/backoffice', function() {
        this.redirect('/backoffice/list');
    }
);

Router.route('/backoffice/:tab', function() {
        this.render('backoffice', {
            data: function() {
                return {activeTab: this.params.tab};
            },
        });
    }
);<commit_msg>Fix ecept/only logic<commit_after>Router.configure({
  layoutTemplate: 'layout',
});

Router.onBeforeAction(function() {
        var currentUser = Meteor.userId();
        var currentRoute = Router.current().route.getName();

        if(currentUser) {
            console.log("GLOBAL::onBeforeAction:logged:", currentRoute);
            this.next();
        } else {
            console.log("GLOBAL::onBeforeAction:NOTlogged:", currentRoute);
            console.log("should render login");
            // this.render("login");
            this.next();
        }
    },
    {
        except: [
                    'home',
                    'register',
                    'login',
                    'application'
                ]
        // only: ['backoffice']
    }
);


Router.route('/', {
    name: 'home'
});

Router.route('/application/success', {
    name: 'application.success'
});

Router.route('/backoffice', function() {
        this.redirect('/backoffice/list');
    }
);

Router.route('/backoffice/:tab', function() {
        this.render('backoffice', {
            data: function() {
                return {activeTab: this.params.tab};
            },
        });
    }
);
{'fraction_non_alphanumeric': 0.16527196652719664, 'fraction_numerical': 0.0, 'mean_word_length': 1.7016949152542373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1582607', 'n_tokens_mistral': 665, 'n_tokens_neox': 651, 'n_words': 94}