diff --git a/ghost/admin/controllers/debug.js b/ghost/admin/controllers/settings/labs.js
similarity index 95%
rename from ghost/admin/controllers/debug.js
rename to ghost/admin/controllers/settings/labs.js
index 8b2fc29ffd..e586f23358 100644
--- a/ghost/admin/controllers/debug.js
+++ b/ghost/admin/controllers/settings/labs.js
@@ -1,4 +1,4 @@
-var DebugController = Ember.Controller.extend(Ember.Evented, {
+var LabsController = Ember.Controller.extend(Ember.Evented, {
uploadButtonText: 'Import',
importErrors: '',
@@ -63,4 +63,4 @@ var DebugController = Ember.Controller.extend(Ember.Evented, {
}
});
-export default DebugController;
+export default LabsController;
diff --git a/ghost/admin/router.js b/ghost/admin/router.js
index f0bbfd031b..4d1fa9b974 100644
--- a/ghost/admin/router.js
+++ b/ghost/admin/router.js
@@ -39,8 +39,10 @@ Router.map(function () {
this.route('about');
this.route('tags');
+ this.route('labs');
});
+ // Redirect debug to settings labs
this.route('debug');
// Redirect legacy content to posts
diff --git a/ghost/admin/routes/debug.js b/ghost/admin/routes/debug.js
index d91ba7fa02..618a9f9773 100644
--- a/ghost/admin/routes/debug.js
+++ b/ghost/admin/routes/debug.js
@@ -1,29 +1,7 @@
-import AuthenticatedRoute from 'ghost/routes/authenticated';
-import styleBody from 'ghost/mixins/style-body';
-import loadingIndicator from 'ghost/mixins/loading-indicator';
-
-var DebugRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
- titleToken: 'Debug',
-
- classNames: ['settings'],
-
- beforeModel: function (transition) {
- this._super(transition);
-
- var self = this;
- this.store.find('user', 'me').then(function (user) {
- if (user.get('isAuthor') || user.get('isEditor')) {
- self.transitionTo('posts');
- }
- });
- },
-
- model: function () {
- return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
- return records.get('firstObject');
- });
+var DebugRoute = Ember.Route.extend({
+ beforeModel: function () {
+ this.transitionTo('settings.labs');
}
-
});
export default DebugRoute;
diff --git a/ghost/admin/routes/settings/labs.js b/ghost/admin/routes/settings/labs.js
new file mode 100644
index 0000000000..727fb4bb30
--- /dev/null
+++ b/ghost/admin/routes/settings/labs.js
@@ -0,0 +1,23 @@
+import AuthenticatedRoute from 'ghost/routes/authenticated';
+import styleBody from 'ghost/mixins/style-body';
+import CurrentUserSettings from 'ghost/mixins/current-user-settings';
+import loadingIndicator from 'ghost/mixins/loading-indicator';
+
+var LabsRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, CurrentUserSettings, {
+ titleToken: 'Labs',
+
+ classNames: ['settings'],
+ beforeModel: function () {
+ return this.currentUser()
+ .then(this.transitionAuthor())
+ .then(this.transitionEditor());
+ },
+
+ model: function () {
+ return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
+ return records.get('firstObject');
+ });
+ }
+});
+
+export default LabsRoute;
diff --git a/ghost/admin/templates/debug.hbs b/ghost/admin/templates/debug.hbs
deleted file mode 100644
index 25936f04be..0000000000
--- a/ghost/admin/templates/debug.hbs
+++ /dev/null
@@ -1,60 +0,0 @@
-Settings
-