Skip to content

Commit

Permalink
chore(schema): export missing permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Marin Veršić <[email protected]>
  • Loading branch information
mversic committed Nov 20, 2024
1 parent 6df8a84 commit 7e55a2f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions crates/iroha_schema_gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,40 @@ pub fn build_schemas() -> MetaMap {

// Default permissions
permission::peer::CanManagePeers,

permission::domain::CanRegisterDomain,
permission::domain::CanUnregisterDomain,
permission::domain::CanModifyDomainMetadata,

permission::account::CanRegisterAccount,
permission::account::CanUnregisterAccount,
permission::account::CanModifyAccountMetadata,

permission::asset_definition::CanRegisterAssetDefinition,
permission::asset_definition::CanUnregisterAssetDefinition,
permission::asset_definition::CanModifyAssetDefinitionMetadata,

permission::asset::CanRegisterAssetWithDefinition,
permission::asset::CanUnregisterAssetWithDefinition,
permission::asset::CanMintAssetWithDefinition,
permission::asset::CanBurnAssetWithDefinition,
permission::asset::CanTransferAssetWithDefinition,
permission::asset::CanRegisterAsset,
permission::asset::CanUnregisterAsset,
permission::asset::CanMintAsset,
permission::asset::CanBurnAsset,
permission::asset::CanTransferAsset,
permission::asset::CanModifyAssetMetadata,

permission::parameter::CanSetParameters,
permission::role::CanManageRoles,

permission::trigger::CanRegisterTrigger,
permission::trigger::CanExecuteTrigger,
permission::trigger::CanUnregisterTrigger,
permission::trigger::CanModifyTrigger,
permission::trigger::CanModifyTriggerMetadata,

permission::executor::CanUpgradeExecutor,

// Multi-signature operations
Expand Down Expand Up @@ -595,6 +605,7 @@ mod tests {
insert_into_test_map!(Compact<u32>);

insert_into_test_map!(iroha_executor_data_model::permission::peer::CanManagePeers);
insert_into_test_map!(iroha_executor_data_model::permission::domain::CanRegisterDomain);
insert_into_test_map!(iroha_executor_data_model::permission::domain::CanUnregisterDomain);
insert_into_test_map!(
iroha_executor_data_model::permission::domain::CanModifyDomainMetadata
Expand All @@ -617,6 +628,8 @@ mod tests {
insert_into_test_map!(
iroha_executor_data_model::permission::asset::CanUnregisterAssetWithDefinition
);
insert_into_test_map!(iroha_executor_data_model::permission::asset::CanMintAssetWithDefinition);
insert_into_test_map!(iroha_executor_data_model::permission::asset::CanBurnAssetWithDefinition);
insert_into_test_map!(
iroha_executor_data_model::permission::asset::CanTransferAssetWithDefinition
);
Expand All @@ -626,8 +639,10 @@ mod tests {
insert_into_test_map!(iroha_executor_data_model::permission::asset::CanBurnAsset);
insert_into_test_map!(iroha_executor_data_model::permission::asset::CanTransferAsset);
insert_into_test_map!(iroha_executor_data_model::permission::asset::CanModifyAssetMetadata);

insert_into_test_map!(iroha_executor_data_model::permission::parameter::CanSetParameters);
insert_into_test_map!(iroha_executor_data_model::permission::role::CanManageRoles);

insert_into_test_map!(iroha_executor_data_model::permission::trigger::CanRegisterTrigger);
insert_into_test_map!(iroha_executor_data_model::permission::trigger::CanExecuteTrigger);
insert_into_test_map!(iroha_executor_data_model::permission::trigger::CanUnregisterTrigger);
Expand Down
17 changes: 17 additions & 0 deletions docs/source/references/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,14 @@
}
]
},
"CanBurnAssetWithDefinition": {
"Struct": [
{
"name": "asset_definition",
"type": "AssetDefinitionId"
}
]
},
"CanExecuteTrigger": {
"Struct": [
{
Expand All @@ -828,6 +836,14 @@
}
]
},
"CanMintAssetWithDefinition": {
"Struct": [
{
"name": "asset_definition",
"type": "AssetDefinitionId"
}
]
},
"CanModifyAccountMetadata": {
"Struct": [
{
Expand Down Expand Up @@ -908,6 +924,7 @@
}
]
},
"CanRegisterDomain": null,
"CanRegisterTrigger": {
"Struct": [
{
Expand Down

0 comments on commit 7e55a2f

Please sign in to comment.