Merge lp:~leonardr/lazr.restful/disable-cache into lp:lazr.restful
Status: | Merged |
---|---|
Approved by: | Gary Poster |
Approved revision: | 134 |
Merged at revision: | 132 |
Proposed branch: | lp:~leonardr/lazr.restful/disable-cache |
Merge into: | lp:lazr.restful |
Diff against target: |
114 lines (+50/-6) 4 files modified
src/lazr/restful/NEWS.txt (+5/-0) src/lazr/restful/_resource.py (+29/-5) src/lazr/restful/docs/multiversion.txt (+15/-0) src/lazr/restful/version.txt (+1/-1) |
To merge this branch: | bzr merge lp:~leonardr/lazr.restful/disable-cache |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Poster | Approve | ||
Review via email: mp+26612@code.launchpad.net |
Description of the change
Argh, I got so used to running Launchpad integration and performance tests in my previous branch that I forgot to run the lazr.restful test suite before landing. My optimized implementation of redacted_fields fails in three cases, each of which was covered by one or another of the various example web services defined in lazr.restful:
1. when there is no Zope permission checker registered for an IEntry implementation
2. when a failure results in a ForbiddenAttribute exception rather than an Unauthorized exception
3. when an IEntry implementation was defined from scratch and as such lacks tagged values (specifically, lacks 'original_name')
I changed redacted_fields to handle all these cases. I'm not really sure why sometimes a permission failure would result in ForbiddenAttribute and sometimes in Unauthorized, but it does happen.
Looks good, thank you.
In 'src/lazr/ restful/ _resource. py', please revert ``from zope.security. interfaces import ForbiddenAttribute, Unauthorized`` to ``from zope.security. interfaces import Unauthorized``.
In the same file, why is ``tagged_values = field.getTagged Value(' lazr.restful. exported' )`` within the try-except block? It seems like the check for original_name is the only line that should be there.
Gary