Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] website: access website in multi-company #40004

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Nov 8, 2019

  • Create 2 companies A & B
  • Create a website A
  • Create a user U with access to company B only
  • Connect as U and go to the website

An internal server error is raised.

This is due to 7bfcb53 which verifies if the user isn't
granted access to companies he is not supposed to access.

This is exactly what was done before this commit: the website is in a
company not allowed to the user. To avoid this, we simply keep the
companies of the user in the context.

opw-2116539

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #39921

- Create 2 companies A & B
- Create a website A
- Create a user U with access to company B only
- Connect as U and go to the website

An internal server error is raised.

This is due to 7bfcb53 which verifies if the user isn't
granted access to companies he is not supposed to access.

This is exactly what was done before this commit: the website is in a
company not allowed to the user.

opw-2116539

X-original-commit: debc516
@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 8, 2019

Ping @nim-odoo
This PR targets master and is the last of the forward-port chain.

To merge the full chain, say

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Nov 8, 2019
@nim-odoo
Copy link
Contributor

nim-odoo commented Nov 8, 2019

@fw-bot r+

@robodoo robodoo added the r+ 👌 label Nov 8, 2019
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Nov 8, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Nov 8, 2019
robodoo pushed a commit that referenced this pull request Nov 8, 2019
- Create 2 companies A & B
- Create a website A
- Create a user U with access to company B only
- Connect as U and go to the website

An internal server error is raised.

This is due to 7bfcb53 which verifies if the user isn't
granted access to companies he is not supposed to access.

This is exactly what was done before this commit: the website is in a
company not allowed to the user.

opw-2116539

closes #40004

X-original-commit: debc516
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Nov 8, 2019

Merged at 194627a, thanks!

@robodoo robodoo closed this Nov 8, 2019
@fw-bot fw-bot deleted the master-13.0-opw-2116539-allowed_company-nim-tnb_-fw branch November 22, 2019 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants