diff --git a/tests/config_test_access.yaml b/tests/config_test_access.yaml index 8fb352f7..332d5a74 100644 --- a/tests/config_test_access.yaml +++ b/tests/config_test_access.yaml @@ -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 + diff --git a/tests/test_acl.py b/tests/test_acl.py index ea7655aa..17472a74 100644 --- a/tests/test_acl.py +++ b/tests/test_acl.py @@ -96,5 +96,13 @@ def test_allowed_different_coll_acl_dir(self): assert '"http://httpbin.org/anything/resource.json"' in resp.text + def test_allow_all_acl_user_specific(self): + resp = self.query('http://example.com', coll='pywb-wildcard-surt') + assert len(resp.text.splitlines()) == 0 + + resp = self.testapp.get('/pywb-wildcard-surt/mp_/http://example.com', headers={"X-Pywb-Acl-User": "staff"}, status=200) + + +