(user, source, project=None)
return access
Check if a user can write to a 'source' recipe.
Check if a user can write to a 'source' recipe.
Check if a user can write to a source recipe .
def writeable_recipe(user, source, project=None):
    """
    Check if a user can write to a 'source' recipe.
    """
    if user.is_anonymous:
        return False

    if source.is_cloned:
        # Check write access using root recipe information for clones.
        target_owner = source.root.owner
        project = source.root.project

    else:
        target_owner = source.owner
        project = project or source.project

    access = is_writable(user=user, project=project, owner=target_owner)
    return access
def writeable_recipe ( user , source , project = None ) : if user . is_anonymous : return False if source . is_cloned : # Check write access using root recipe information for clones. target_owner = source . root . owner project = source . root . project else : target_owner = source . owner project = project or source . project access = is_writable ( user = user , project = project , owner = target_owner ) return access