diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index d9fcd18..ccee8eb 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -320,16 +320,15 @@ def query_results( denied_t = hash_lookup(request.user, tags) denied.extend(denied_t) - message = [] + message = "Permission denied: " for x in denied: if isinstance(x, SearchDenied): - message.append(f"Permission denied to search by {x.key}: {x.value}") + message += f"Search({x.key}: {x.value}) " elif isinstance(x, LookupDenied): - message.append(f"Tag {x.key}: {x.value} not expected here. Nice try.") + message += f"Lookup({x.key}: {x.value}) " if denied: - print("DENIED DICT", message) - message = [f"{i}" for i in message] - message = "\n".join(message) + #message = [f"{i}" for i in message] + #message = "\n".join(message) message_class = "danger" return {"message": message, "class": message_class}