Replace all calls to clean_subpage_types with allowed_subpage_types

`clean_subpage_types` should not be part of the public API any more, and
`allowed_subpage_types` should replace it in all instances.
This commit is contained in:
Tim Heap 2014-07-24 10:49:30 +10:00
parent 96e9079890
commit 18909c834f

View file

@ -1057,7 +1057,7 @@ class PagePermissionTester(object):
def can_add_subpage(self):
if not self.user.is_active:
return False
if not self.page.specific_class.clean_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed
if not self.page.specific_class.allowed_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed
return False
return self.user.is_superuser or ('add' in self.permissions)
@ -1121,7 +1121,7 @@ class PagePermissionTester(object):
"""
if not self.user.is_active:
return False
if not self.page.specific_class.clean_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed
if not self.page.specific_class.allowed_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed
return False
return self.user.is_superuser or ('publish' in self.permissions)