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

[FIX] website: access website in multi-company #39921

Closed

Conversation

nim-odoo
Copy link
Contributor

@nim-odoo nim-odoo commented Nov 7, 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

@nim-odoo nim-odoo self-assigned this Nov 7, 2019
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Nov 7, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Nov 7, 2019
@nim-odoo nim-odoo force-pushed the 13.0-opw-2116539-allowed_company-nim branch from 09b59ad to 87af019 Compare November 7, 2019 14:03
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Nov 7, 2019
@nim-odoo nim-odoo force-pushed the 13.0-opw-2116539-allowed_company-nim branch from 87af019 to d928eff Compare November 7, 2019 14:22
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Nov 7, 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
@nim-odoo nim-odoo force-pushed the 13.0-opw-2116539-allowed_company-nim branch from d928eff to 90cd4f3 Compare November 7, 2019 20:45
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 7, 2019
@nim-odoo
Copy link
Contributor Author

nim-odoo commented Nov 8, 2019

robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Nov 8, 2019

Merged at debc516, thanks!

@fw-bot fw-bot deleted the 13.0-opw-2116539-allowed_company-nim branch November 22, 2019 09:46
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 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

3 participants