Skip to content

Commit

Permalink
Merge pull request discourse#919 from nirnanaaa/master
Browse files Browse the repository at this point in the history
Staff scope defined in User model but not used in staff_constraint
  • Loading branch information
eviltrout committed May 29, 2013
2 parents 8182a9d + 00c1c46 commit 487c25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/staff_constraint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 487c25c

Please sign in to comment.