mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 11:59:17 -05:00
12 lines
289 B
JavaScript
12 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');
|
|
}
|
|
}
|
|
|
|
});
|