(login, repo_base, repo, privilege)
Raises PermissonDenied if user does not have the DATABASE privilege
        passed in the argument, e.g. 'USAGE'.

        Relies on database role management, so this is a pretty straightforward
        call.
Raises PermissonDenied if user does not have the DATABASE privilege
        passed in the argument, e.g. 'USAGE'.
Raises PermissonDenied if user does not have the DATABASE privilege passed in the argument e . g . USAGE .
def has_repo_db_privilege(login, repo_base, repo, privilege):
        """
        Raises PermissonDenied if user does not have the DATABASE privilege
        passed in the argument, e.g. 'USAGE'.

        Relies on database role management, so this is a pretty straightforward
        call.
        """
        repo = repo.lower()
        repo_base = repo_base.lower()
        with _superuser_connection(repo_base) as conn:
            result = conn.has_repo_db_privilege(
                login=login, repo=repo, privilege=privilege)
        if not result:
            raise PermissionDenied()
def has_repo_db_privilege ( login , repo_base , repo , privilege ) : repo = repo . lower ( ) repo_base = repo_base . lower ( ) with _superuser_connection ( repo_base ) as conn : result = conn . has_repo_db_privilege ( login = login , repo = repo , privilege = privilege ) if not result : raise PermissionDenied ( )