def check_root_access(repos):
    """Return 1 iff the associated username is permitted to read REPOS,
    as determined by consulting REPOS's Authorizer object (if any)."""

    auth = repos.authorizer()
    if not auth:
        return 1
    return auth.check_root_access(repos.rootname())