mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -53,7 +53,7 @@ make_WsContext(
|
||||
return Error{{ClioError::rpcINVALID_API_VERSION, apiVersion.error()}};
|
||||
|
||||
string const command = commandValue.as_string().c_str();
|
||||
return web::Context(yc, command, *apiVersion, request, session, tagFactory, range, clientIp);
|
||||
return web::Context(yc, command, *apiVersion, request, session, tagFactory, range, clientIp, session->isAdmin());
|
||||
}
|
||||
|
||||
Expected<web::Context, Status>
|
||||
@@ -63,7 +63,8 @@ make_HttpContext(
|
||||
TagDecoratorFactory const& tagFactory,
|
||||
data::LedgerRange const& range,
|
||||
string const& clientIp,
|
||||
std::reference_wrapper<APIVersionParser const> apiVersionParser)
|
||||
std::reference_wrapper<APIVersionParser const> apiVersionParser,
|
||||
bool const isAdmin)
|
||||
{
|
||||
if (!request.contains("method"))
|
||||
return Error{{ClioError::rpcCOMMAND_IS_MISSING}};
|
||||
@@ -91,7 +92,8 @@ make_HttpContext(
|
||||
if (!apiVersion)
|
||||
return Error{{ClioError::rpcINVALID_API_VERSION, apiVersion.error()}};
|
||||
|
||||
return web::Context(yc, command, *apiVersion, array.at(0).as_object(), nullptr, tagFactory, range, clientIp);
|
||||
return web::Context(
|
||||
yc, command, *apiVersion, array.at(0).as_object(), nullptr, tagFactory, range, clientIp, isAdmin);
|
||||
}
|
||||
|
||||
} // namespace rpc
|
||||
|
||||
Reference in New Issue
Block a user