Prevent anon/banned/member users from voting (fix #2719).
There was a regression in 6d6d00b; `before_filter :voter_only` was a no-op in the post vote controller because it merely returned false, which does not halt the request. The fix is to arrange for a voter_only method to be defined that properly redirects to the access denied page.
This commit is contained in:
@@ -14,10 +14,4 @@ class PostVotesController < ApplicationController
|
||||
rescue PostVote::Error => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def voter_only
|
||||
CurrentUser.is_voter?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user