1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

Support 202106 (#994)

* fixes #965: intermittent bug during consolidation of notifications

* fixes #863: better visibility for input validation errors

* fixes #375: re-evaluate affiliation requests on email change

* fixes #741: remove data quality validation for superusers

* fixes #587: customizable pagination in django admin

* fixes #923: Prevent deletion of a last technical contact if there is an existing netixlan object

* better search #23 (first pass)

* black format

* haystack test config to run_tests.py
remove old django_init.py test settings

* black format

* haystack test config fixes

* #23 better search (pt.2)

* rate limit distance queries (#23)
rate limiting based on query filters

* settings controlled blocking of distance filter for unauthenticated / unverified users (#23)

* fix distance filter throttling with api key auth (#23)

* fix anon user access check on distance queries

* search index and performance tweaks

* fix org_id not set in search results

* org id to int

Co-authored-by: Stefan Pratter <stefan@20c.com>
This commit is contained in:
Matt Griswold
2021-07-07 17:57:04 -05:00
committed by GitHub
parent 9f74fb8a11
commit 7c3d160dec
51 changed files with 1853 additions and 784 deletions

View File

@@ -90,6 +90,8 @@ class DummyRestClientWithKeyAuth(RestClient):
# Set up with users
if self.user:
self.user_inst = models.User.objects.get(username=self.user)
elif kwargs.get("anon"):
self.user_inst = None
else:
self.user_inst = models.User.objects.get(username="guest")
@@ -98,7 +100,7 @@ class DummyRestClientWithKeyAuth(RestClient):
self.key = kwargs.get("key")
self.api_client.credentials(HTTP_AUTHORIZATION="Api-Key " + self.key)
print(f"authenticating {self.user} w key {self.key}")
else:
elif self.user_inst:
self.api_client.force_authenticate(self.user_inst)
def _request(self, typ, id=0, method="GET", params=None, data=None, url=None):