This commit is contained in:
r888888888
2013-04-21 11:36:43 -07:00
parent 53c8babe3e
commit e2a38ebc17
11 changed files with 46 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ protected
%w(member banned builder privileged platinum contributor janitor moderator admin).each do |level|
define_method("#{level}_only") do
if CurrentUser.user.__send__("is_#{level}?")
if !CurrentUser.user.is_banned? && CurrentUser.user.__send__("is_#{level}?")
true
else
access_denied()

View File

@@ -2,7 +2,7 @@ class BansController < ApplicationController
before_filter :moderator_only, :except => [:show, :index]
def new
@ban = Ban.new
@ban = Ban.new(params[:ban])
end
def edit