mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 19:03:46 +08:00
17 lines
393 B
JavaScript
17 lines
393 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
|
|
export default Ember.Controller.extend({
|
|
@computed('model.@each.enabled_setting')
|
|
adminRoutes() {
|
|
let routes = [];
|
|
|
|
this.get('model').forEach(p => {
|
|
if (this.siteSettings[p.get('enabled_setting')] && p.get('admin_route')) {
|
|
routes.push(p.get('admin_route'));
|
|
}
|
|
});
|
|
|
|
return routes;
|
|
}
|
|
});
|