1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00
This commit is contained in:
Tessa Walsh 2024-02-13 12:33:37 -05:00
parent c27ff67c44
commit 7c5fa48667
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1 @@
*, - {"access": "allow", "user": "staff"}

View File

@ -62,6 +62,13 @@ collections:
acl_paths:
- ./sample_archive/access/pywb.aclj
pywb-wildcard-surt:
index_paths: ./sample_archive/cdx/
archive_paths: ./sample_archive/warcs/
default_access: block
acl_paths:
- ./sample_archive/access/allow_all.aclj

View File

@ -96,5 +96,9 @@ class TestACLApp(BaseConfigTest):
assert '"http://httpbin.org/anything/resource.json"' in resp.text
def test_allow_all_acl_user_specific(self):
resp = self.testapp.get('/pywb-wildcard-surt/mp_/http://example.com/', status=451)
assert 'Access Blocked' in resp.text
resp = self.testapp.get('/pywb-wildcard-surt/mp_/http://example.com/', headers={"X-Pywb-Acl-User": "staff"}, status=200)