From 7e55a2fc790d32d3d33869244ec80ac9d1ca8155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marin=20Ver=C5=A1i=C4=87?= Date: Wed, 20 Nov 2024 14:04:30 +0100 Subject: [PATCH] chore(schema): export missing permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marin Veršić --- crates/iroha_schema_gen/src/lib.rs | 15 +++++++++++++++ docs/source/references/schema.json | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/crates/iroha_schema_gen/src/lib.rs b/crates/iroha_schema_gen/src/lib.rs index b0fd0fe0b4..0e3e106beb 100644 --- a/crates/iroha_schema_gen/src/lib.rs +++ b/crates/iroha_schema_gen/src/lib.rs @@ -64,16 +64,23 @@ 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, @@ -81,13 +88,16 @@ pub fn build_schemas() -> MetaMap { 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 @@ -595,6 +605,7 @@ mod tests { insert_into_test_map!(Compact); 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 @@ -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 ); @@ -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); diff --git a/docs/source/references/schema.json b/docs/source/references/schema.json index a3d775a690..49dbe78853 100644 --- a/docs/source/references/schema.json +++ b/docs/source/references/schema.json @@ -810,6 +810,14 @@ } ] }, + "CanBurnAssetWithDefinition": { + "Struct": [ + { + "name": "asset_definition", + "type": "AssetDefinitionId" + } + ] + }, "CanExecuteTrigger": { "Struct": [ { @@ -828,6 +836,14 @@ } ] }, + "CanMintAssetWithDefinition": { + "Struct": [ + { + "name": "asset_definition", + "type": "AssetDefinitionId" + } + ] + }, "CanModifyAccountMetadata": { "Struct": [ { @@ -908,6 +924,7 @@ } ] }, + "CanRegisterDomain": null, "CanRegisterTrigger": { "Struct": [ {