Check if a user has permission to view another page in Django CMS
I would like to check if a user has the permissions (is part of the groups necessary) to view a different page than the current one.
from cms.models.permissionmodels import PagePermission
if PagePermission.objects.filter(page=page_to_check, user=request.user, can_view=True).exists():
always returns false.
How can I check if the user should be able to view the page_to_check
?
Thank you!