How to use the ghost/routes/authenticated.extend function in ghost

To help you get started, we’ve selected a few ghost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost / core / client / app / routes / settings.js View on Github external
import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';

var SettingsRoute = AuthenticatedRoute.extend(styleBody, {
    titleToken: 'Settings',

    classNames: ['settings']
});

export default SettingsRoute;
github TryGhost / Ghost / core / client / app / routes / settings / users.js View on Github external
import AuthenticatedRoute from 'ghost/routes/authenticated';

var UsersRoute = AuthenticatedRoute.extend();

export default UsersRoute;
github TryGhost / Ghost-Admin / app / routes / settings / users.js View on Github external
import AuthenticatedRoute from 'ghost/routes/authenticated';

var UsersRoute = AuthenticatedRoute.extend();

export default UsersRoute;
github TryGhost / Ghost-Admin / app / routes / about.js View on Github external
import {request as ajax} from 'ic-ajax';
import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';

export default AuthenticatedRoute.extend(styleBody, {
    titleToken: 'About',

    classNames: ['view-about'],

    cachedConfig: false,

    model: function () {
        var cachedConfig = this.get('cachedConfig'),
            self = this;

        if (cachedConfig) {
            return cachedConfig;
        }

        return ajax(this.get('ghostPaths.url').api('configuration'))
            .then(function (configurationResponse) {
github TryGhost / Ghost-Admin / app / routes / settings.js View on Github external
import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';

var SettingsRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
    titleToken: 'Settings',

    classNames: ['settings']
});

export default SettingsRoute;
github TryGhost / Ghost-Admin / app / routes / settings / apps.js View on Github external
import Ember from 'ember';
import AuthenticatedRoute from 'ghost/routes/authenticated';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import styleBody from 'ghost/mixins/style-body';

export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
    titleToken: 'Apps',

    classNames: ['settings-view-apps'],

    config: Ember.inject.service(),

    beforeModel: function (transition) {
        this._super(transition);

        if (!this.get('config.apps')) {
            return this.transitionTo('settings.general');
        }

        return this.get('session.user')
            .then(this.transitionAuthor())
            .then(this.transitionEditor());