-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unity build: prepare support in irohad
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
- Loading branch information
Showing
7 changed files
with
84 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright Soramitsu Co., Ltd. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "ametsuchi/impl/executor_common.hpp" | ||
|
||
#include <boost/algorithm/string/classification.hpp> | ||
#include <boost/algorithm/string/split.hpp> | ||
#include "interfaces/permissions.hpp" | ||
|
||
namespace iroha { | ||
namespace ametsuchi { | ||
|
||
const std::string kRootRolePermStr{ | ||
shared_model::interface::RolePermissionSet( | ||
{shared_model::interface::permissions::Role::kRoot}) | ||
.toBitstring()}; | ||
|
||
shared_model::interface::types::DomainIdType getDomainFromName( | ||
const shared_model::interface::types::AccountIdType &account_id) { | ||
// TODO 03.10.18 andrei: IR-1728 Move getDomainFromName to shared_model | ||
std::vector<std::string> res; | ||
boost::split(res, account_id, boost::is_any_of("@")); | ||
return res.at(1); | ||
} | ||
|
||
} // namespace ametsuchi | ||
} // namespace iroha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Copyright Soramitsu Co., Ltd. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP | ||
#define IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP | ||
|
||
#include "interfaces/common_objects/types.hpp" | ||
|
||
namespace iroha { | ||
namespace ametsuchi { | ||
|
||
extern const std::string kRootRolePermStr; | ||
|
||
shared_model::interface::types::DomainIdType getDomainFromName( | ||
const shared_model::interface::types::AccountIdType &account_id); | ||
|
||
} // namespace ametsuchi | ||
} // namespace iroha | ||
|
||
#endif // IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters