Merge pull request #919 from nirnanaaa/master
Staff scope defined in User model but not used in staff_constraint
This commit is contained in:
commit
487c25cbd7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue