Implement hashing bypass for groups

This commit is contained in:
2022-08-16 19:43:55 +01:00
parent e67eee8cc8
commit e08a7677ef
11 changed files with 123 additions and 63 deletions

View File

@@ -23,6 +23,7 @@ def construct_query(index, net, channel, src, num, size, type=None, nicks=None):
"type",
"net",
"src",
"tokens",
]
if index == "int":
fields.append("mtype")

View File

@@ -448,10 +448,11 @@ def query_results(
results_parsed = dedup_list(results_parsed, dedup_fields)
if settings.ENCRYPTION:
encrypt_list(results_parsed, settings.ENCRYPTION_KEY)
encrypt_list(request.user, results_parsed, settings.ENCRYPTION_KEY)
if settings.HASHING:
hash_list(results_parsed)
if not request.user.has_perm("view_plain"):
if settings.HASHING:
hash_list(request.user, results_parsed)
# process_list(reqults)