parameters: (login, repo_base, repo, privilege)
docstring: 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.
docstring_summary: Raises PermissonDenied if user does not have the DATABASE privilege
          passed in the argument, e.g. 'USAGE'.
docstring_tokens: Raises PermissonDenied if user does not have the DATABASE privilege passed in the argument e . g . USAGE .
function: 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()
function_tokens: 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 ( )