mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 05:55:51 +00:00
Split into server_info (for humans) and server_state (for machines).
Allow either without admin privileges, filter information out from non-admins. Cleanup and improve data in all cases.
This commit is contained in:
@@ -1305,7 +1305,16 @@ Json::Value RPCHandler::doServerInfo(Json::Value)
|
||||
{
|
||||
Json::Value ret(Json::objectValue);
|
||||
|
||||
ret["info"] = theApp->getOPs().getServerInfo(mRole == ADMIN);
|
||||
ret["info"] = theApp->getOPs().getServerInfo(true, mRole == ADMIN);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Json::Value RPCHandler::doServerState(Json::Value)
|
||||
{
|
||||
Json::Value ret(Json::objectValue);
|
||||
|
||||
ret["info"] = theApp->getOPs().getServerInfo(false, mRole == ADMIN);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2589,7 +2598,8 @@ Json::Value RPCHandler::doCommand(Json::Value& jvRequest, int iRole)
|
||||
{ "ripple_path_find", &RPCHandler::doRipplePathFind, false, optCurrent },
|
||||
{ "sign", &RPCHandler::doSign, false, optCurrent },
|
||||
{ "submit", &RPCHandler::doSubmit, false, optCurrent },
|
||||
{ "server_info", &RPCHandler::doServerInfo, true, optNone },
|
||||
{ "server_info", &RPCHandler::doServerInfo, false, optNone },
|
||||
{ "server_state", &RPCHandler::doServerState, false, optNone },
|
||||
{ "stop", &RPCHandler::doStop, true, optNone },
|
||||
{ "transaction_entry", &RPCHandler::doTransactionEntry, false, optCurrent },
|
||||
{ "tx", &RPCHandler::doTx, false, optNetwork },
|
||||
|
||||
Reference in New Issue
Block a user