Feat(privacy): Add granular privacy controls of public profile (#17178)

* feat(privacy): Add granular privacy controls of public profile

* feat(certs): Hide certs if showCerts is false
This commit is contained in:
Stuart Taylor
2018-05-20 04:07:41 +01:00
committed by Quincy Larson
parent a1f2fc7c5c
commit bb4bcbfb45
17 changed files with 441 additions and 95 deletions

View File

@@ -747,6 +747,22 @@ module.exports = function(User) {
`);
};
User.prototype.updateMyProfileUI = function updateMyProfileUI(profileUI) {
const oldUI = { ...this.profileUI };
const update = {
profileUI: {
...oldUI,
...profileUI
}
};
return this.update$(update)
.do(() => Object.assign(this, update))
.map(() => dedent`
Your privacy settings have been updated.
`);
};
User.prototype.updateMyUsername = function updateMyUsername(newUsername) {
return Observable.defer(
() => {