非公開時アクセスエラー修正
AThoto、ATPhotoAlbumオブジェクトを非公開の状態にすると、作成者ですらアクセス権がねぇ!って怒られるバグ修正
【環境】
- Zope-2.8.6-final (Linux)
- Plone-2.1.3
- ATPhoto-1-0-alpha1
- FileSystemStorage-2.5rc1
ここ で見つかったこの問題。…痛いのです。このバグで非公開にしておいて水面下でいじりまくるというワザができないでのですよorz
で、本家のIssueを漁ってみると発見。ではそのように修正。
/portal_skins/ATPhoto/atphoto_view :19行目あたりしゅーりょー。Fixしますた。
<tal:main-macro metal:define-macro="main"
tal:define="size python:context.getObjSize(context);
content_type context/content_type; << ココ
scale request/size|request/cookies/size|string:preview;
force_refresh request/force_refresh|python:False;
Iterator python:modules['Products.CMFPlone'].IndexIterator;
tabindex python:Iterator();
">
↓
<tal:main-macro metal:define-macro="main"
tal:define="size python:context.getObjSize(context);
content_type context/getMimeType; << ココ
scale request/size|request/cookies/size|string:preview;
force_refresh request/force_refresh|python:False;
Iterator python:modules['Products.CMFPlone'].IndexIterator;
tabindex python:Iterator();
">