Don't allow banned ip addresses to make changes
Previously banned ip addresses couldn't make new accounts, but if they get an account somehow the ip ban wouldn't prevent them from making edits.
This commit is contained in:
@@ -118,7 +118,7 @@ protected
|
||||
|
||||
%w(member banned builder gold platinum janitor moderator admin).each do |level|
|
||||
define_method("#{level}_only") do
|
||||
if !CurrentUser.user.is_banned? && CurrentUser.user.__send__("is_#{level}?")
|
||||
if !CurrentUser.user.is_banned_or_ip_banned? && CurrentUser.user.__send__("is_#{level}?")
|
||||
true
|
||||
else
|
||||
access_denied()
|
||||
|
||||
Reference in New Issue
Block a user