Implement integer field randomisation
This commit is contained in:
@@ -14,6 +14,7 @@ from core.views.helpers import (
|
||||
hash_list,
|
||||
hash_lookup,
|
||||
obfuscate_list,
|
||||
randomise_list,
|
||||
)
|
||||
|
||||
# from json import dumps
|
||||
@@ -571,6 +572,9 @@ def query_results(
|
||||
if settings.OBFUSCATION:
|
||||
obfuscate_list(request.user, results_parsed)
|
||||
|
||||
if settings.RANDOMISATION:
|
||||
randomise_list(request.user, results_parsed)
|
||||
|
||||
# process_list(reqults)
|
||||
|
||||
# IMPORTANT! - DO NOT PASS query_params to the user!
|
||||
@@ -586,6 +590,9 @@ def query_results(
|
||||
if settings.DELAY_RESULTS:
|
||||
if not request.user.has_perm("bypass_delay"):
|
||||
context["delay"] = settings.DELAY_DURATION
|
||||
if settings.RANDOMISATION:
|
||||
if not request.user.has_perm("bypass_randomisation"):
|
||||
context["randomised"] = True
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user