bellroy / lesswrong

Less Wrong platform
http://lesswrong.org/
Other
49 stars 23 forks source link

require a minimum user karma to upvote and downvote #558

Closed xrpd closed 8 years ago

xrpd commented 8 years ago

This is intended to resolve issue #550.

A new global 'no_voting_threshold' is added. A user's karma must be greater than this value before the upvote and downvote icons will appear (i.e., before thing.votable is set to true). The modification to link.py is made in the two places that also prevent an author from upvoting their own articles and comments.

I modified example.ini, test.ini and provisioning/cookbooks/lesswrong/templates/default/development.ini.erb to include a 'no_voting_threshold' example. It will have to be added to a production .ini file to successfully implement this patch.

Tested with no_voting_threshold at various values. The voting icons appear and disappear depending on user karma as expected.

xrpd commented 8 years ago

Agreed, and will do. I was just wary of renaming existing configuration options without encouragement.

xrpd commented 8 years ago

@wezm global configuration parameters renamed per your suggestion.

wezm commented 8 years ago

Looks good. @cdaloisio note that ini file changes will be needed before this can be deployed.

cdaloisio commented 8 years ago

Great :+1: Production config values are now as follows:

karma_to_vote = 10
karma_to_vote_on_polls = 0
cdaloisio commented 8 years ago

Closes #550