このコミットが含まれているのは:
@@ -43,12 +43,9 @@ class CountsTableQuery
|
||||
ApplicationRecord.transaction do
|
||||
result = metadata.merge(mode == 'summary' ? summary : details)
|
||||
visible = mode == 'summary' ? result[:visible_output_count] : result[:count]
|
||||
# A scalar result has one row regardless of private attributes or predicates.
|
||||
public_count = result[:excluded_count].zero? || (mode == 'summary' && axes.rows.empty?)
|
||||
result.merge(visible_output_count: visible,
|
||||
output_count: public_count ? visible : nil,
|
||||
output_count_scope: public_count ?
|
||||
'before_authorisation' : 'unavailable_private_history',
|
||||
output_count: visible,
|
||||
output_count_scope: 'authorised_results',
|
||||
output_count_unit: 'table_body_rows',
|
||||
page_grand_total_repeated: mode == 'summary' && axes.rows.any? &&
|
||||
result[:group_count] > limit)
|
||||
@@ -57,7 +54,12 @@ class CountsTableQuery
|
||||
|
||||
def metadata
|
||||
@population_counts ||= HistoryAccess.population_counts(@definition.model)
|
||||
# Global exclusions are not exclusions for this filtered query. Do not expose
|
||||
# private predicate matches through a condition-dependent count.
|
||||
exclusions_known = @population_counts[:excluded_count].zero?
|
||||
@population_counts.merge(
|
||||
excluded_count: exclusions_known ? 0 : nil,
|
||||
excluded_count_scope: exclusions_known ? 'current_query' : 'unavailable_private_history',
|
||||
population_count_scope: 'all_recorded_versions',
|
||||
page:, limit:, execution_at: population.at.iso8601(6), at: @params['at'].presence,
|
||||
definition: population.history ? 'history' : 'latest',
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする