mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
there is a scope in User model but not used in staff_constraint
This commit is contained in:
parent
acb2623b4b
commit
00c1c4691d
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ class StaffConstraint
|
||||||
|
|
||||||
def matches?(request)
|
def matches?(request)
|
||||||
return false unless request.session[:current_user_id].present?
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue