@permission_pre_checks(action='add_page')
@cached_func
def user_can_add_subpage(user, target, site=None):
 has_perm = has_generic_permission(page=target, user=user, action='add_page', site=site)
 return has_perm

@ permission_pre_checks ( action = 'add_page' ) @ cached_func def user_can_add_subpage ( user , target , site = None ) : has_perm = has_generic_permission ( page = target , user = user , action = 'add_page' , site = site ) return has_perm
return true if the current user has permission to add a new page under target .