Skip to content
Snippets Groups Projects
Commit f931cfa1 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Exclude apply site from pages if not a super user

parent 13de9eed
No related branches found
No related tags found
No related merge requests found
from wagtail.core import hooks
from .models import ApplyHomePage
@hooks.register('construct_explorer_page_queryset')
def exclude_fund_pages(parent_page, pages, request):
# Don't allow editors to access the Apply pages in the explorer unless they know whats up
if not request.user.is_superuser:
pages = pages.not_ancestor_of(ApplyHomePage.objects.first(), inclusive=True)
return pages
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment