[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
This commit is contained in:
len-odoo
2018-07-17 16:02:01 +02:00
committed by len-odoo
parent a3fd6a2072
commit d5baec40ab
+1 -1
View File
@@ -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>