Skip to content
Snippets Groups Projects
Commit d341efaf authored by Nasreddin Boulif (bon)'s avatar Nasreddin Boulif (bon)
Browse files

[FIX] website_slides: Raise error if not responsible on invite


Steps to reproduce:

- Install `E-learning` module
- Create a user X with only "Officer" as rights for `E-learning`
- Login with user X
- Go to `E-learning` and open any course
- Ensure that the user X is not the responsible and that the course
  enroll policy is set to "On invitation"
- Invite any user not already a member

Issue:

  No user was invited (not added as member) and no warning message
  raised.

Cause:

  Due to the ir.rule "Channel: officer: create/write own only", the
  `Officer` user can only edit (and therefore invite members) on
  courses where he is responsible.

Solution:

  Add a context key to the 'Invite' buttons in the `Form` and `Kanban`
  views of `slide.channel` model so that we can raise an error only in
  these flows if the user does not have the rights to invite members.

opw-3133733

closes odoo/odoo#111642

Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
parent 32aca111
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment