Skip to content

Commit

Permalink
Use permissions correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
davisnando committed Nov 20, 2023
1 parent 3bf81e5 commit 52771eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wagtail_personalisation/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def page_listing_variant_buttons(page, *args, **kwargs):
"""
if len(args) == 0 and kwargs.get("user"):
page_perms = kwargs.get("user").permission_set_for_page(page)
page_perms = page.permissions_for_user(kwargs["user"])
elif len(args) == 1:
page_perms = args[0]
else:
Expand Down

0 comments on commit 52771eb

Please sign in to comment.