Files
odoo_source/addons/website_slides/data
Martin Trigaux 6f4dad6f28 [FIX] website_slides: do not subscribe portal user
Everytime somebody leaves a review, it sends a message to every
follower of the subtype "Discussion". Portal users were subscribed
without realising it.

Issue 1:
When subscribing via the controller, a user was subscribed to the
"Discussion" subtype instead of "Presentation Published".

Issue 2:
When requesting access, if there is no responsible for a channel, the
activity_schedule method fallback on the current user (portal) and
subscribe him to the channel at the same time.
If there is no responsible, there is nobody to request access to.
Disable the o_wslides_js_channel_enroll to hide the request access
popup and skip the activity_schedule if the method was called anyway
(i.e. fix for stable without updating the view)

DELETE FROM mail_followers_mail_message_subtype_rel r
 USING mail_followers f,
       res_users u
 WHERE u.partner_id=f.partner_id
   AND r.mail_followers_id=f.id
   AND r.mail_message_subtype_id=1
   AND f.res_model = 'slide.channel'
   AND u.share = true;

closes odoo/odoo#145742

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-20 02:42:51 +00:00
..