DEV: Upgrade admin-plugins-explorer to Octane (#219)
This commit is contained in:
parent
f51bc050a2
commit
5a65c15463
|
@ -1,12 +1,9 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import User from "discourse/models/user";
|
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default class AdminPluginsExplorer extends DiscourseRoute {
|
||||||
controllerName: "admin-plugins-explorer",
|
|
||||||
|
|
||||||
model() {
|
model() {
|
||||||
if (!User.currentProp("admin")) {
|
if (!this.currentUser.admin) {
|
||||||
// display "Only available to admins" message
|
// display "Only available to admins" message
|
||||||
return { model: null, schema: null, disallow: true, groups: null };
|
return { model: null, schema: null, disallow: true, groups: null };
|
||||||
}
|
}
|
||||||
|
@ -34,9 +31,9 @@ export default DiscourseRoute.extend({
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
controller.setProperties(model);
|
controller.setProperties(model);
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
|
|
Loading…
Reference in New Issue