11 auto st = stat.find(coopname.value);
13 if (st == stat.end()) {
26 bool is_trustee(eosio::name coopname, eosio::name username) {
29 auto by_trustee_index = branches.get_index<
"bytrustee"_n>();
30 auto trustee_itr = by_trustee_index.find(username.value);
32 return trustee_itr != by_trustee_index.end();
42 bool is_trusted(eosio::name coopname, eosio::name braname, eosio::name username) {
44 auto branch_itr = branches.find(braname.value);
46 if (branch_itr == branches.end()) {
50 return branch_itr->is_account_in_trusted(username);
static constexpr eosio::name _branch
Definition: consts.hpp:160
eosio::multi_index<"branchstat"_n, branchstat > branchstat_index
Definition: branch.hpp:18
eosio::multi_index<"branches"_n, coobranch, eosio::indexed_by<"bytrustee"_n, eosio::const_mem_fun< coobranch, uint64_t, &coobranch::by_trustee > > > branch_index
Definition: branch.hpp:109
Definition: shared_branch.hpp:3
bool is_trusted(eosio::name coopname, eosio::name braname, eosio::name username)
Проверяет, является ли пользователь доверенным лицом (trusted) в указанном участке кооператива
Definition: shared_branch.hpp:42
bool is_trustee(eosio::name coopname, eosio::name username)
Проверяет, является ли пользователь уполномоченным лицом (trustee) кооперативного участка
Definition: shared_branch.hpp:26
uint64_t get_branch_count(eosio::name coopname)
Получает количество кооперативных участков для данного кооператива
Definition: shared_branch.hpp:9