        if (typeof credentials !== 'undefined' && credentials !== null) {

            if (next.data.permission && !this.isAllowed(next.data.permission)) {
                return false;
            }

            return true;