def has_page_change_permission(self): if not hasattr(self, 'page_change_permission'): if not self.page and not get_cms_setting('PERMISSION'): # We can't check permissions for an individual page # and can't check global cms permissions because # user opted out of them. # So just check django auth permissions. user = self.request.user can_change = has_auth_page_permission(user, action='change') else: can_change = can_change_page(self.request) self.page_change_permission = can_change return self.page_change_permission
def has_page_change_permission(self): if not hasattr(self, 'page_change_permission'): self.page_change_permission = can_change_page(self.request) return self.page_change_permission