Commit 27ac48c3 authored by Alexis Reigel's avatar Alexis Reigel Committed by Alexis Reigel

Apply suggestion to lib/api/search.rb

parent fcf90d05
......@@ -54,7 +54,7 @@ module API
end
def check_users_search_allowed!
if Feature.disabled?(:users_search, default_enabled: true) && params[:scope].to_sym == :users
if params[:scope].to_sym == :users && Feature.disabled?(:users_search, default_enabled: true)
render_api_error!({ error: _("Scope not supported with disabled 'users_search' feature!") }, 400)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment