users: rework privacy mode into private favorites (fix #4257).

* Rename 'privacy mode' to 'private favorites'.
* Make the private favorites setting only hide favorites, not favgroups
  and not the user's uploads on their profile page.
* Make the favgroup is_public flag default to true instead of false and
  fix existing favgroups to be public if the user didn't have privacy mode
  enabled before.
* List _all_ public favgroups on the /favorite_groups index, not just
  favgroups belonging to the current user.
* Add a /users/<id>/favorite_groups endpoint.
This commit is contained in:
evazion
2020-01-17 19:59:47 -06:00
parent 2095dd3084
commit 4a7322b197
15 changed files with 44 additions and 38 deletions

View File

@@ -7,7 +7,7 @@
<% end %>
<% unless CurrentUser.is_anonymous? %>
<%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %>
<%= subnav_link_to "Fav groups", favorite_groups_path %>
<%= subnav_link_to "Fav groups", user_favorite_groups_path(CurrentUser.id) %>
<%= subnav_link_to "Saved searches", posts_path(tags: "search:all") %>
<% end %>
<%= subnav_link_to "Changes", post_versions_path %>