def privilege_exist(privileges, datastore_url):
    """ Check whether a entry with given datastore_name exists in privileges """
    for p in privileges:
        if datastore_url == p.datastore_url:
            return True

    return False