Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::permission_link_object Class Reference

The permission_link_object class assigns permission_objects to message types. More...

#include <permission_link_object.hpp>

Inheritance diagram for sysio::chain::permission_link_object:
Collaboration diagram for sysio::chain::permission_link_object:

Additional Inherited Members

- Public Types inherited from chainbase::object< permission_link_object_type, permission_link_object >
typedef oid< permission_link_object > id_type
 
- Static Public Attributes inherited from chainbase::object< permission_link_object_type, permission_link_object >
static const uint16_t type_id
 

Detailed Description

This class records the links from contracts and message types within those contracts to permission_objects defined by the user to record the authority required to execute those messages within those contracts. For example, suppose we have a contract called "currency" and that contract defines a message called "transfer". Furthermore, suppose a user, "joe", has a permission level called "money" and joe would like to require that permission level in order for his account to invoke currency.transfer. To do this, joe would create a permission_link_object for his account with "currency" as the code account, "transfer" as the message_type, and "money" as the required_permission. After this, in order to validate, any message to "currency" of type "transfer" that requires joe's approval would require signatures sufficient to satisfy joe's "money" authority.

Accounts may set links to individual message types, or may set default permission requirements for all messages to a given contract. To set the default for all messages to a given contract, set message_type to the empty string. When looking up which permission to use, if a link is found for a particular {account, code, message_type} triplet, then the required_permission from that link is used. If no such link is found, but a link is found for {account, code, ""}, then the required_permission from that link is used. If no such link is found, account's active authority is used.

Definition at line 26 of file permission_link_object.hpp.


The documentation for this class was generated from the following file: