[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:
@@ -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 < forum.karma_edit_retag" t-att-title="'You need to have sufficient karma to edit tags' if user.karma < forum.karma_edit_retag else ''"/>
|
||||
<br/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-lg">Save</button>
|
||||
|
||||
Reference in New Issue
Block a user