You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/12/25 10:37:03 UTC

[4/4] allura git commit: [#8003] ticket:877 Allow moderators to delete attachments from comments

[#8003] ticket:877 Allow moderators to delete attachments from comments


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/996d82b1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/996d82b1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/996d82b1

Branch: refs/heads/ib/8003
Commit: 996d82b12295fb0af7323132cb1fa5ac07f44a66
Parents: 97a7936
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Dec 24 17:51:33 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Thu Dec 24 17:51:33 2015 +0200

----------------------------------------------------------------------
 Allura/allura/templates/widgets/post_widget.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/996d82b1/Allura/allura/templates/widgets/post_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/post_widget.html b/Allura/allura/templates/widgets/post_widget.html
index 88fa1d1..096e829 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -79,13 +79,13 @@
                     <a href="{{att.url()}}"><img src="{{att.url()}}/thumb" alt="Thumbnail"/></a>
                     <br/>
                     <a href="{{att.url()}}">{{att.filename}}</a>
-                    {% if c.user._id and value.author_id==c.user._id %}
+                    {% if h.has_access(value, 'moderate')()%}
                         <br>
                         <input class="submit delete_attachment pic" type="submit" value="X"/>
                     {% endif %}
                 {% else %}
                     <a href="{{att.url()}}">{{att.filename}}</a>
-                    {% if c.user._id and value.author_id==c.user._id %}
+                    {% if h.has_access(value, 'moderate')()%}
                     <input class="submit delete_attachment file" type="submit" value="X"/>
                     {% endif %}
                 {% endif %}