This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/restricted-user.js.es6
2015-03-19 19:57:07 +01:00

12 lines
233 B
JavaScript

// A base route that allows us to redirect when access is restricted
export default Discourse.Route.extend({
afterModel() {
if (!this.modelFor('user').get('can_edit')) {
this.replaceWith('userActivity');
}
}
});