Skip to content

Commit

Permalink
[FIX] website_menu_by_user_status: Change condition to maintain core …
Browse files Browse the repository at this point in the history
…funcionality.

There was a bug that changes how the core works and allowed access to
an unpublished page from one of its menus if it is set to visible to
your logged-in or non-logged-in users, taking us to an error page
  • Loading branch information
alejandro-vallejoFL committed Jul 30, 2024
1 parent c9ab366 commit 801aa98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website_menu_by_user_status/models/website_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _compute_visible(self):
super()._compute_visible()
for menu in self:
if not menu.is_visible:
menu.is_visible = False
continue

Check warning on line 36 in website_menu_by_user_status/models/website_menu.py

View check run for this annotation

Codecov / codecov/patch

website_menu_by_user_status/models/website_menu.py#L36

Added line #L36 was not covered by tests

if self.env.user == self.env.ref("base.public_user"):
menu.is_visible = menu.user_not_logged
Expand Down

0 comments on commit 801aa98

Please sign in to comment.