allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [16/16] allura git commit: [#8230] Clean up codes and revert permission check for comments
Date Mon, 15 Oct 2018 16:02:40 GMT
[#8230] Clean up codes and revert permission check for comments


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

Branch: refs/heads/master
Commit: 521c68049a61fd5c58a0af3f043a335af5a31946
Parents: 77cceb0
Author: Shalitha <shalithasuranga@gmail.com>
Authored: Sat Oct 13 17:44:32 2018 +0530
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Oct 15 15:50:29 2018 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/discuss.py                    | 2 +-
 Allura/allura/templates/widgets/post_widget.html        | 2 +-
 ForgeTracker/forgetracker/templates/tracker/ticket.html | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/521c6804/Allura/allura/controllers/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/discuss.py b/Allura/allura/controllers/discuss.py
index c2fda01..6bdc289 100644
--- a/Allura/allura/controllers/discuss.py
+++ b/Allura/allura/controllers/discuss.py
@@ -347,7 +347,7 @@ class PostController(BaseController):
     @expose('json:')
     @require_post()
     def update_markdown(self, text=None, **kw):  
-        if has_access(self.post, 'edit'):
+        if has_access(self.post, 'moderate'):
             self.post.text = text
             self.post.edit_count = self.post.edit_count + 1
             self.post.last_edit_date = datetime.utcnow()

http://git-wip-us.apache.org/repos/asf/allura/blob/521c6804/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 058f701..4add9ff 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -78,7 +78,7 @@
                 <b>{{value.subject or '(no subject)'}}<br/></b>
             {% endif %}
 
-            <div{% if h.has_access(value, 'edit') %} class="active-md" data-markdownlink="{{value.url()}}"
{% endif %}>{{g.markdown.cached_convert(value, 'text')|safe}}</div>&nbsp;
+            <div{% if h.has_access(value, 'moderate') %} class="active-md" data-markdownlink="{{value.url()}}"
{% endif %}>{{g.markdown.cached_convert(value, 'text')|safe}}</div>&nbsp;
             {{lib.related_artifacts(value)}}
             {% if value.edit_count %}
                 <br><small>Last edit: {{value.last_edit_by().display_name}} {{h.ago(value.last_edit_date)}}</small>

http://git-wip-us.apache.org/repos/asf/allura/blob/521c6804/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index b46be48..666775f 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -149,7 +149,7 @@
   {{ c.vote_form.display(artifact=ticket) }}
 {% endif %}
 <div id="ticket_content">
-  <div{% if h.has_access(ticket, 'update') %} class="active-md" data-markdownlink=""{%
endif %}}>{{g.markdown.cached_convert(ticket, 'description')|safe}}</div>
+  <div{% if h.has_access(ticket, 'update') %} class="active-md" data-markdownlink=""{%
endif %}>{{g.markdown.cached_convert(ticket, 'description')|safe}}</div>
   {% if ticket.attachments %}
     <strong class="grid-18">{{ticket.attachments|length}} Attachments</strong>
     <div class="clear">


Mime
View raw message