mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <xrpl/protocol/Permissions.h>
|
|
#include <xrpl/protocol/STLedgerEntry.h>
|
|
#include <xrpl/protocol/STTx.h>
|
|
#include <xrpl/protocol/TER.h>
|
|
|
|
namespace xrpl {
|
|
|
|
/**
|
|
* Check if the delegate account has permission to execute the transaction.
|
|
* @param delegate The delegate account.
|
|
* @param tx The transaction that the delegate account intends to execute.
|
|
* @return tesSUCCESS if the transaction is allowed, terNO_DELEGATE_PERMISSION
|
|
* if not.
|
|
*/
|
|
NotTEC
|
|
checkTxPermission(std::shared_ptr<SLE const> const& delegate, STTx const& tx);
|
|
|
|
/**
|
|
* Load the granular permissions granted to the delegate account for the
|
|
* specified transaction type
|
|
* @param delegate The delegate account.
|
|
* @param type Used to determine which granted granular permissions to load,
|
|
* based on the transaction type.
|
|
* @param granularPermissions Granted granular permissions tied to the
|
|
* transaction type.
|
|
*/
|
|
void
|
|
loadGranularPermission(
|
|
std::shared_ptr<SLE const> const& delegate,
|
|
TxType const& type,
|
|
std::unordered_set<GranularPermissionType>& granularPermissions);
|
|
|
|
} // namespace xrpl
|