summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorlen-odoo <len@odoo.com>2018-07-17 13:40:34 +0200
committerlen-odoo <35492570+len-odoo@users.noreply.github.com>2018-07-17 16:02:01 +0200
commitd5baec40abed2498def649bcbbe16c5035acaa66 (patch)
treebbf8489ddc64f588d71fc292a3bf895b91ac8c07 /addons
parenta3fd6a2072020f8be41ab76986bc04c1a298528d (diff)
[FIX] web_forum: disallow tag editing of questions if karma is unsufficient
When editing his post, a user can modify the tags even if he doesn't have sufficient karma to do so. Since the backend raises an error, it sends the user to a 403 forbidden page. opw 1866019
Diffstat (limited to 'addons')
-rw-r--r--addons/website_forum/views/website_forum.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml
index eb0b3a06131..5030f9dba30 100644
--- a/addons/website_forum/views/website_forum.xml
+++ b/addons/website_forum/views/website_forum.xml
@@ -620,7 +620,7 @@
<div t-if="not is_answer">
<br/>
<input type="hidden" name="karma_edit_retag" t-attf-value="#{forum.karma_edit_retag}" id="karma_edit_retag"/>
- <input type="text" name="post_tags" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}" value="Tags"/>
+ <input type="text" name="post_tags" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}" value="Tags" t-att-readonly="user.karma &lt; forum.karma_edit_retag" t-att-title="'You need to have sufficient karma to edit tags' if user.karma &lt; forum.karma_edit_retag else ''"/>
<br/>
</div>
<button type="submit" class="btn btn-primary btn-lg">Save</button>