Skip to content

Commit

Permalink
add a separate hide_from_lists privacy setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed May 31, 2016
1 parent 85647bd commit 1dc5466
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions liberapay/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __str__(self):
('hide_receiving', _("Hide total receiving from others.")),
('hide_from_search', _("Hide myself from search results on Liberapay.")),
('profile_noindex', _("Tell web search engines not to index my profile.")),
('hide_from_lists', _("Prevent my profile from being listed on Liberapay.")),
])
PRIVACY_FIELDS_S = ' '.join(PRIVACY_FIELDS.keys())

Expand Down
1 change: 1 addition & 0 deletions sql/branch.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ALTER TABLE participants ADD COLUMN profile_noindex boolean DEFAULT TRUE;
ALTER TABLE participants ADD COLUMN hide_from_lists boolean DEFAULT FALSE;
2 changes: 1 addition & 1 deletion tests/py/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_team_participant_does_show_up_on_explore_teams(self):

def test_team_participant_doesnt_show_up_on_explore_teams(self):
alice = Participant.from_username('alice')
self.make_participant('A-Team', kind='group', hide_from_search=True).add_member(alice)
self.make_participant('A-Team', kind='group', hide_from_lists=True).add_member(alice)
assert 'A-Team' not in self.client.GET("/explore/teams/").text


Expand Down
2 changes: 1 addition & 1 deletion www/explore/teams/index.spt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ teams = website.db.all("""
JOIN participants p
ON p.id = t.id
WHERE (p.goal >= 0 OR p.goal IS NULL)
AND NOT p.hide_from_search
AND NOT p.hide_from_lists
ORDER BY receiving DESC, join_time DESC

""")
Expand Down

0 comments on commit 1dc5466

Please sign in to comment.