mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-10 00:06:13 +00:00
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:
parent
96e9079890
commit
18909c834f
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue