[FIX] website_slides: allow to use only in POST

This method only expects to be called as POST and should not be called
with GET.
This commit enforces that.

[CLA] Signature for sushiwushi

closes odoo/odoo#71575

X-original-commit: 00f2eeee7aa514599b40e049be46eacdcc8332fa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
fw-bot
2021-06-01 17:22:18 +00:00
committed by Martin Trigaux
parent a6d1c3ec64
commit de5be74db5
3 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class SlidesPortalChatter(PortalChatter):
@http.route([
'/slides/mail/update_comment',
'/mail/chatter_update',
], type='json', auth="user")
], type='json', auth="user", methods=['POST'])
def mail_update_message(self, res_model, res_id, message, message_id, attachment_ids=None, attachment_tokens=None, **post):
# keep this mechanism intern to slide currently (saas 12.5) as it is
# considered experimental
+1 -1
View File
@@ -1031,7 +1031,7 @@ class WebsiteSlides(WebsiteProfile):
'can_create': can_create,
}
@http.route('/slides/category/add', type="http", website=True, auth="user")
@http.route('/slides/category/add', type="http", website=True, auth="user", methods=['POST'])
def slide_category_add(self, channel_id, name):
""" Adds a category to the specified channel. Slide is added at the end
of slide list based on sequence. """
+11
View File
@@ -0,0 +1,11 @@
Malaysia, 2021-06-01
I hereby agree to the terms of the Odoo Individual Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
iamsushi 45194995+sushiwushi@users.noreply.github.com https://github.com/sushiwushi