some adjustments on permissions for editing and showing certain portlets
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1622 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
8a6a9a938d
commit
00aa042550
2 changed files with 3 additions and 1 deletions
|
@ -246,6 +246,8 @@ class BaseView(GenericView):
|
||||||
@Lazy
|
@Lazy
|
||||||
def xeditable(self):
|
def xeditable(self):
|
||||||
ct = getattr(self.context, 'contentType', '')
|
ct = getattr(self.context, 'contentType', '')
|
||||||
|
if ct == 'application/pdf':
|
||||||
|
return False
|
||||||
if ct.startswith('text/'):
|
if ct.startswith('text/'):
|
||||||
return self.request.principal.id == 'rootadmin'
|
return self.request.principal.id == 'rootadmin'
|
||||||
return canWrite(self.context, 'title')
|
return canWrite(self.context, 'title')
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
tal:attributes="href string:${view/url}/.target${view/targetId}/view">
|
tal:attributes="href string:${view/url}/.target${view/targetId}/view">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
<tal:xedit condition="view/xeditable"> |
|
<tal:xedit condition="item/xeditable"> |
|
||||||
<a href="#" title="Edit with External Editor"
|
<a href="#" title="Edit with External Editor"
|
||||||
tal:define="url string:${view/url}/.target${view/targetId}"
|
tal:define="url string:${view/url}/.target${view/targetId}"
|
||||||
tal:attributes="href string:$url/external_edit">
|
tal:attributes="href string:$url/external_edit">
|
||||||
|
|
Loading…
Add table
Reference in a new issue