Merge pull request #919 from nirnanaaa/master

Staff scope defined in User model but not used in staff_constraint
This commit is contained in:
Robin Ward 2013-05-29 12:18:19 -07:00
commit 487c25cbd7
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class StaffConstraint
def matches?(request)
return false unless request.session[:current_user_id].present?
User.where("admin = 't' or moderator = 't'").where(id: request.session[:current_user_id].to_i).exists?
User.staff.where(id: request.session[:current_user_id].to_i).exists?
end
end