Skip to content

Commit

Permalink
don't include admin account in provider list
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 24, 2019
1 parent 185395c commit 1f8f516
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def query(query, options={})
must << { term: { focus_area: options[:focus_area] }} if options[:focus_area].present?

must_not << { exists: { field: "deleted_at" }} unless options[:include_deleted]
must_not << { term: { role_name: "ROLE_ADMIN" }}
elsif self.name == "Client"
must << { range: { created: { gte: "#{options[:year].split(",").min}||/y", lte: "#{options[:year].split(",").max}||/y", format: "yyyy" }}} if options[:year].present?
must << { terms: { "software.raw" => options[:software].split(",") }} if options[:software].present?
Expand Down

0 comments on commit 1f8f516

Please sign in to comment.