From 758d63b4eeb1affde758dff851eb03e30273cecc Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 16:37:03 +0800 Subject: [PATCH 1/7] Update the authority structure Update the authority structure --- docs/02_cleos/03_command-reference/set/set-account.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index 71886d07c1c..d5f9eedf1e6 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -38,7 +38,7 @@ To modify the permissions of an account, you must have the authority over the ac The first example associates a new key to the active permissions of an account. ```sh -cleos set account permission test active '{"threshold" : 1, "keys" : [{"permission":{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active"},"weight":1}], "accounts" : [{"permission":{"account":"acc2","permission":"active"},"weight":50}]}' owner +cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner ``` This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the @test account to another account. From 1df25641e4bd917d7754d7fe80ba939d82a31507 Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 16:41:45 +0800 Subject: [PATCH 2/7] update 2nd & 3rd JSON update 2nd & 3rd JSON --- docs/02_cleos/03_command-reference/set/set-account.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index d5f9eedf1e6..26af0afc0e2 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -43,12 +43,13 @@ cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7M This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the @test account to another account. ```sh -cleos set account permission test active '{"threshold" : 1, "keys" : [], "accounts" : [{"permission":{"account":"sandwich","permission":"active"},"weight":1},{"permission":{"account":"acc1","permission":"active"},"weight":50}]}' owner +cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"acc1","permission":"active"},"weight":50},{"permission":{"actor":"sandwich","permission":"active"},"weight":1}],"waits":[]}' owner ``` -The third example demonstrates how to setup permissions for multisig. + +The third example demonstrates how to set up permissions for multisig. ```sh -cleos set account permission test active '{"threshold" : 100, "keys" : [{"permission":{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active"},"weight":25}], "accounts" : [{"permission":{"account":"@sandwich","permission":"active"},"weight":75}]}' owner +cleos set account permission test active '{"threshold" : 100, "keys" : [{"permission":{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active"},"weight":25}], "accounts" : [{"permission":{"actor":"sandwich","permission":"active"},"weight":75}]}' owner ``` The JSON object used in this command is actually composed of two different types of objects From 2a0e61b54cdf4f8c25a81c8e405efc4f68c4f5a1 Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 16:44:28 +0800 Subject: [PATCH 3/7] put back permission put back permission --- docs/02_cleos/03_command-reference/set/set-account.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index 26af0afc0e2..8d0f5120a36 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -38,7 +38,7 @@ To modify the permissions of an account, you must have the authority over the ac The first example associates a new key to the active permissions of an account. ```sh -cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner +cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' ``` This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the @test account to another account. From 2b8f250f4d7466f69d0062ef7370bad1dfcadb63 Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 17:01:09 +0800 Subject: [PATCH 4/7] remove old account name syntax remove old account name syntax --- docs/02_cleos/03_command-reference/set/set-account.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index 8d0f5120a36..977d1deaebb 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -5,7 +5,7 @@ set parameters dealing with account permissions - `account` _TEXT_ - The account to set/delete a permission authority for - `permission` _TEXT_ - The permission name to set/delete an authority for - `authority` _TEXT_ - [delete] NULL, [create/update] public key, JSON string, or filename defining the authority -- `parent` _TEXT_ - [create] The permission name of this parents permission (Defaults to: "Active") +- `parent` _TEXT_ - [create] The permission name of this parents permission (Defaults to: "active") ## Options `-h,--help` Print this help message and exit @@ -33,14 +33,14 @@ set parameters dealing with account permissions `--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s ## Command -To modify the permissions of an account, you must have the authority over the account and the permission of which you are modifying. The set account permission command is subject to change so it's associated Class is not fully documented. +To modify the permissions of an account, you must have the authority over the account and the permission of which you are modifying. The first example associates a new key to the active permissions of an account. ```sh -cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' +cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner ``` -This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the @test account to another account. +This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the test account to another account. ```sh cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"acc1","permission":"active"},"weight":50},{"permission":{"actor":"sandwich","permission":"active"},"weight":1}],"waits":[]}' owner From e99c5b7fec724d2c8f067f9e1360f24df27388e1 Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 17:03:53 +0800 Subject: [PATCH 5/7] update update --- docs/02_cleos/03_command-reference/set/set-account.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index 977d1deaebb..c0327d0aa35 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -33,7 +33,7 @@ set parameters dealing with account permissions `--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s ## Command -To modify the permissions of an account, you must have the authority over the account and the permission of which you are modifying. +To modify the permissions of an account, you must have the authority over the account and the permission of which you are modifying. The set account permission command is subject to change so it's associated Class is not fully documented. The first example associates a new key to the active permissions of an account. @@ -43,7 +43,7 @@ cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7M This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the test account to another account. ```sh -cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"acc1","permission":"active"},"weight":50},{"permission":{"actor":"sandwich","permission":"active"},"weight":1}],"waits":[]}' owner +cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"acc1","permission":"active"},"weight":50},{"permission":{"actor":"sandwich","permission":"active"},"weight":1}]}' owner ``` The third example demonstrates how to set up permissions for multisig. From 17c9253cf150f9b301978bdc982f75538eb36c42 Mon Sep 17 00:00:00 2001 From: dixia <667070+dixia@users.noreply.github.com> Date: Thu, 21 May 2020 18:01:06 +0800 Subject: [PATCH 6/7] update 3rd example update 3rd example --- docs/02_cleos/03_command-reference/set/set-account.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index c0327d0aa35..6cd1907e8b5 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -49,7 +49,7 @@ cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{ The third example demonstrates how to set up permissions for multisig. ```sh -cleos set account permission test active '{"threshold" : 100, "keys" : [{"permission":{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active"},"weight":25}], "accounts" : [{"permission":{"actor":"sandwich","permission":"active"},"weight":75}]}' owner +cleos set account permission test active '{"threshold" : 100, "keys" : [{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":25}], "accounts" : [{"permission":{"actor":"sandwich","permission":"active"},"weight":75}]}' owner ``` The JSON object used in this command is actually composed of two different types of objects From 01e6619c2bf548f6db474f5be42c8469a0d0c47d Mon Sep 17 00:00:00 2001 From: Han Liu <667070+dixia@users.noreply.github.com> Date: Tue, 2 Jun 2020 11:04:36 +0800 Subject: [PATCH 7/7] Simplify the JSON payload Simplify the JSON payload. Remove the redandent permission field( for unconfirmed reason, the parser let it pass and it was working) --- docs/02_cleos/03_command-reference/set/set-account.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md index 6cd1907e8b5..2aa1c07f592 100755 --- a/docs/02_cleos/03_command-reference/set/set-account.md +++ b/docs/02_cleos/03_command-reference/set/set-account.md @@ -38,7 +38,7 @@ To modify the permissions of an account, you must have the authority over the ac The first example associates a new key to the active permissions of an account. ```sh -cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner +cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner ``` This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the test account to another account.