allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [4/4] allura git commit: [#8003] ticket:877 Allow moderators to delete attachments from comments
Date Tue, 05 Jan 2016 23:14:48 GMT
[#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/master
Commit: 996d82b12295fb0af7323132cb1fa5ac07f44a66
Parents: 97a7936
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Dec 24 17:51:33 2015 +0200
Committer: Igor Bondarenko <jetmind2@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 %}


Mime
View raw message