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.
This commit is contained in:
Robin Ward
2018-10-10 13:00:08 -04:00
parent fd48ba10b8
commit a566ed42ae
27 changed files with 178 additions and 23 deletions

View File

@ -37,6 +37,12 @@ describe ::Presence::PresencesController do
expect { post '/presence/publish.json' }.not_to raise_error
end
it "does not publish for users with disabled presence features" do
user1.user_option.update_column(:hide_profile_and_presence, true)
post '/presence/publish.json'
expect(response.code).to eq("404")
end
it "uses guardian to secure endpoint" do
private_post = Fabricate(:private_message_post)