Skip to content

Commit

Permalink
use different methods for filtering drafts
Browse files Browse the repository at this point in the history
use different methods for filtering drafts
  • Loading branch information
kjgarza committed Jul 1, 2019
1 parent 1504c86 commit 61134c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/clients_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def totals
page = { size: 0, number: 1}
response = nil
bmt = Benchmark.ms {
state = authenticate_user!.present? && authenticate_user!.is_admin? && params[:state].present? ? params[:state] : "registered,findable"
state = current_user.present? && current_user.is_admin_or_staff? && params[:state].present? ? params[:state] : "registered,findable"
response = Doi.query(nil, provider_id: params[:provider_id], state: state, page: page, totals_agg: true)
}
if bmt > 10000
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def totals
page = { size: 0, number: 1 }
response = nil
bmt = Benchmark.ms {
state = authenticate_user!.present? && authenticate_user!.is_admin? && params[:state].present? ? params[:state] : "registered,findable"
state = current_user.present? && current_user.is_admin_or_staff? && params[:state].present? ? params[:state] : "registered,findable"
response = Doi.query(nil, state: state, page: page, totals_agg: true)
}

Expand Down

0 comments on commit 61134c2

Please sign in to comment.