pywb
pywb copied to clipboard
ACL access allow_ignore_embargo doesn't work with a user
Describe the bug
When specifying an embargo for a collection and then putting allow_ignore_embargo for a specific user in the aclj-file, the embargoed url:s don't show up in the search results. If one circumvents the search results and goes directly to the page view, the page actually shows up.
Steps to reproduce the bug
config.yaml:
collections:
exempel:
archive_paths: /usr/local/sample_archive/warcs/
index: /usr/local/sample_archive/cdx
embargo:
newer:
years: 10
acl_paths: allows.aclj
allows.aclj:
com,example)/ - {"access": "allow_ignore_embargo", "user": "admin"}
Actual behavior
curl -iHX-Pywb-ACL-User:admin 'http://localhost:8090/exempel/cdx?url=example.com&output=json'
HTTP/1.1 200 OK
Content-Type: text/x-ndjson
Expected behavior
curl -iHX-Pywb-ACL-User:admin 'http://localhost:8090/exempel/cdx?url=example.com&output=json'
HTTP/1.1 200 OK
Content-Type: text/x-ndjson
{"urlkey": "com,example)/", "timestamp": "20130729195151", "url": "http://[email protected]/", "mime": "warc/revisit", "status": "-", "digest": "B2LTWWPUOYAH7UIPQ7ZUPQ4VMBSVC36A", "redirect": "-", "robotflags": "-", "length": "591", "offset": "355", "filename": "example-url-agnostic-revisit.warc.gz", "source": "exempel:url-agnost-example.cdx", "source-coll": "exempel", "access": "block"}
{"urlkey": "com,example)/", "timestamp": "20140127171200", "url": "http://example.com", "mime": "text/html", "status": "200", "digest": "B2LTWWPUOYAH7UIPQ7ZUPQ4VMBSVC36A", "redirect": "-", "robotflags": "-", "length": "1046", "offset": "334", "filename": "dupes.warc.gz", "source": "exempel:dupes.cdx", "source-coll": "exempel", "access": "block"}
{"urlkey": "com,example)/", "timestamp": "20140127171251", "url": "http://example.com", "mime": "warc/revisit", "status": "-", "digest": "B2LTWWPUOYAH7UIPQ7ZUPQ4VMBSVC36A", "redirect": "-", "robotflags": "-", "length": "553", "offset": "11875", "filename": "dupes.warc.gz", "source": "exempel:dupes.cdx", "source-coll": "exempel", "access": "block"}
Screenshots

Environment
- OS: RHEL 7
- Browser [e.g. chrome, safari]: curl or Firefox
- Version [e.g. 22]: pywb 2.6.7
Additional context
The docs specifically mentions this use case.