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/user-activity.js.es6
Robin Ward a566ed42ae FEATURE: Option to disable user presence and profile
This allows users who are privacy conscious to disable the presence
features of the forum as well as their public profile.
2018-10-10 17:34:33 -04:00

15 lines
318 B
JavaScript

export default Discourse.Route.extend({
model() {
let user = this.modelFor("user");
if (user.get("profile_hidden")) {
return this.replaceWith("user.profile-hidden");
}
return user;
},
setupController(controller, user) {
this.controllerFor("user-activity").set("model", user);
}
});