diff options
| author | nie <nie@odoo.com> | 2021-01-15 10:17:55 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2021-01-18 15:45:40 +0000 |
| commit | b02a99bec709b5a6dc4dabb6cb81435dadc24e7e (patch) | |
| tree | 91ec95bbc1134d3c923c528b684cb2ff9d351bbd /addons/website/models/ir_ui_view.py | |
| parent | a9e221e85ba229498ef3a46180dfe2c5992bf97b (diff) | |
[FIX] website: page visibility 'connected' leads to a 403 when connected
Steps:
- As admin, go to "Contact us" or any other page on the website (1)
- Go to Pages > Page Properties > Publish
- Change the visibility to Signed In
- Save
- As demo, go to (1)
Bug:
The user "demo" is signed in but is returned a 403 Forbidden
Explanation:
When landing on a page with visibility: 'connected', the only way to see
the page is to have a group matching the groups of the page as seen
here: https://github.com/odoo/odoo/blob/28b748a559e1ffb5fb7c3631bf77adba121b2ebf/odoo/addons/base/models/ir_ui_view.py#L625-L626
This fix lets any connected users see the page.
opw:2431700
closes odoo/odoo#64596
Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/website/models/ir_ui_view.py')
| -rw-r--r-- | addons/website/models/ir_ui_view.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website/models/ir_ui_view.py b/addons/website/models/ir_ui_view.py index b4237c74715..69022920a39 100644 --- a/addons/website/models/ir_ui_view.py +++ b/addons/website/models/ir_ui_view.py @@ -364,8 +364,7 @@ class View(models.Model): else: error = werkzeug.exceptions.Forbidden('website_visibility_password_required') - # elif self.visibility == 'restricted_group' and self.groups_id: or if groups_id set from backend - if self.visibility != 'password': + if self.visibility not in ('password', 'connected'): try: self._check_view_access() except AccessError: |
