4#include <eosio/eosio.hpp>
7#include "../consts.hpp"
25 auto itr = std::remove(trusted.begin(), trusted.end(),
account);
26 eosio::check(itr != trusted.end(),
"Account not found in trusted list");
27 trusted.erase(itr, trusted.end());
31 return std::find(trusted.begin(), trusted.end(),
account) != trusted.end();
35 if (trustee == username) {
42typedef eosio::multi_index<
44 eosio::indexed_by<
"bytrustee"_n, eosio::const_mem_fun<coobranch, uint64_t, &coobranch::by_trustee>>>
49 auto branch = branches.find(braname.value);
51 eosio::check(
branch != branches.end(),
"Кооперативный Участок не найден");
Константы контракта кооперативных участков
Definition: branch.hpp:51
static constexpr eosio::name _branch
Definition: consts.hpp:160
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Definition: table_registrator_accounts.hpp:14
Definition: table_branch_branches.hpp:14
uint64_t by_trustee() const
Definition: table_branch_branches.hpp:20
void add_account_to_trusted(const eosio::name &account)
Definition: table_branch_branches.hpp:22
uint64_t primary_key() const
Definition: table_branch_branches.hpp:19
void remove_account_from_trusted(const eosio::name &account)
Definition: table_branch_branches.hpp:24
bool is_user_authorized(const eosio::name &username) const
Definition: table_branch_branches.hpp:34
bool is_account_in_trusted(const eosio::name &account) const
Definition: table_branch_branches.hpp:30
eosio::name trustee
Definition: table_branch_branches.hpp:16
std::vector< eosio::name > trusted
Definition: table_branch_branches.hpp:17
eosio::name braname
Definition: table_branch_branches.hpp:15
coobranch get_branch_or_fail(eosio::name coopname, eosio::name braname)
Definition: table_branch_branches.hpp:47
eosio::multi_index< "branches"_n, coobranch, eosio::indexed_by<"bytrustee"_n, eosio::const_mem_fun< coobranch, uint64_t, &coobranch::by_trustee > > > branch_index
Definition: table_branch_branches.hpp:45