mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 04:13:15 +08:00
13 lines
289 B
JavaScript
13 lines
289 B
JavaScript
import DiscourseRoute from 'discourse/routes/discourse';
|
|
|
|
// A base route that allows us to redirect when access is restricted
|
|
export default DiscourseRoute.extend({
|
|
|
|
afterModel() {
|
|
if (!this.modelFor('user').get('can_edit')) {
|
|
this.replaceWith('userActivity');
|
|
}
|
|
}
|
|
|
|
});
|