Redirect authors and editors away from debug page

A signed in user with role author or editor will be redirected back to
/ghost.

closes #3292
No worries, I'm just going comment happy


On Wed, Jul 23, 2014 at 3:24 PM, Felix Rieseberg <notifications@github.com>
wrote:

> In core/client/routes/debug.js:
>
> > @@ -4,11 +4,22 @@ import loadingIndicator from 'ghost/mixins/loading-indicator';
> >  var DebugRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
> >      classNames: ['settings'],
> >
> > +    beforeModel: function () {
> > +        var self = this;
> > +        this.store.find('user', 'me').then(function (user) {
> > +            // TODO: Implement server-side permissions check
>
> Absolutely. The to-do is a hint towards @ErisDS
> <https://github.com/ErisDS>'s comment that this isn't a final solution,
> but I'm happy to remove it.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/TryGhost/Ghost/pull/3376/files#r15316919>.
>