changeset 3350:7707cd079690

info: show only delete options to users with the delete right
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Mar 2008 15:30:59 +0100
parents 9ceb503dd7a6
children 55102b9ed091
files MoinMoin/action/info.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Thu Mar 20 15:21:23 2008 +0100
+++ b/MoinMoin/action/info.py	Thu Mar 20 15:30:59 2008 +0100
@@ -146,7 +146,8 @@
                         actions.append(render_action(_('edit'), {'action': 'AttachFile', 'drawing': '%s' % filename.replace(".draw", "")}))
 
                     actions.append(render_action(_('get'), {'action': 'AttachFile', 'do': 'get', 'target': '%s' % filename}))
-                    actions.append(render_action(_('del'), {'action': 'AttachFile', 'do': 'del', 'target': '%s' % filename}))
+                    if request.user.may.delete(pagename):
+                        actions.append(render_action(_('del'), {'action': 'AttachFile', 'do': 'del', 'target': '%s' % filename}))
 
             history.addRow((
                 rev,