Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #ifndef IROHA_GRANT_PERMISSION_HPP
7 : #define IROHA_GRANT_PERMISSION_HPP
8 :
9 : #include <string>
10 : #include "model/command.hpp"
11 :
12 : namespace iroha {
13 : namespace model {
14 :
15 : /**
16 : * Grant permission from creator to account_id
17 : */
18 : struct GrantPermission : public Command {
19 : /**
20 : * Account to which grant the permission.
21 : * Permission will be granted from creator to account_id on
22 : * *permission_name*
23 : */
24 : std::string account_id;
25 :
26 : /**
27 : * Permission to grant (what)
28 : */
29 : std::string permission_name;
30 :
31 : bool operator==(const Command &command) const override;
32 :
33 : GrantPermission() {}
34 :
35 : GrantPermission(const std::string &account_id_,
36 : const std::string &permission_name_)
37 6 : : account_id(account_id_), permission_name(permission_name_) {}
38 : };
39 : } // namespace model
40 : } // namespace iroha
41 :
42 : #endif // IROHA_GRANT_PERMISSION_HPP
|