Skip to content

Commit

Permalink
allow access to image scales in an edge case
Browse files Browse the repository at this point in the history
svn path=/plone.namedfile/trunk/; revision=51654
  • Loading branch information
davisagli committed Aug 18, 2011
1 parent a38c711 commit c530622
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/HISTORY.txt
Expand Up @@ -4,6 +4,10 @@ Changelog
1.0.4 - unreleased
------------------

* Make sure image scales of allowed attributes can be accessed on disallowed
containers.
[davisagli]

* Add unit tests for safe_filename, since not exercised within this module.
(should be moved to plone.formwidget.namedfile?)
[lentinj]
Expand Down
4 changes: 4 additions & 0 deletions plone/namedfile/scaling.py
Expand Up @@ -20,6 +20,10 @@
class ImageScale(BrowserView):
""" view used for rendering image scales """

# Grant full access to this view even if the object being viewed is protected
# (it's okay because we explicitly validate access to the image attribute
# when we retrieve it)
__roles__ = ('Anonymous',)
__allow_access_to_unprotected_subobjects__ = 1

def __init__(self, context, request, **info):
Expand Down

0 comments on commit c530622

Please sign in to comment.