From 9d86b30494f435190ff15d13de31aa4f9ef43077 Mon Sep 17 00:00:00 2001 From: vsmk98 Date: Wed, 8 May 2019 18:53:51 +0800 Subject: [PATCH] permissions: Documentation update --- controls/permission/permission.go | 28 +++++++++++----------- docs/permissions/setup.md | 40 +++++++++++++++---------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/controls/permission/permission.go b/controls/permission/permission.go index 426c9ea4a..97ba2b4a4 100644 --- a/controls/permission/permission.go +++ b/controls/permission/permission.go @@ -34,21 +34,21 @@ const ( // permission config for bootstrapping type PermissionLocalConfig struct { - UpgrdAddress string - InterfAddress string - ImplAddress string - NodeAddress string - AccountAddress string - RoleAddress string - VoterAddress string - OrgAddress string - NwAdminOrg string - NwAdminRole string - OrgAdminRole string + UpgrdAddress string `json:"upgrdableAddress"` + InterfAddress string `json:"interfaceAddress"` + ImplAddress string `json:"implAddress"` + NodeAddress string `json:"nodeMgrAddress"` + AccountAddress string `json:"accountMgrAddress"` + RoleAddress string `json:"roleMgrAddress"` + VoterAddress string `json:"voterMgrAddress"` + OrgAddress string `json:"orgMgrAddress"` + NwAdminOrg string `json:"nwAdminOrg"` + NwAdminRole string `json:"nwAdminRole"` + OrgAdminRole string `json:"orgAdminRole"` - Accounts []string //initial list of account that need full access - SubOrgBreadth string - SubOrgDepth string + Accounts []string `json:"accounts"` //initial list of account that need full access + SubOrgBreadth string `json:"subOrgBreadth"` + SubOrgDepth string `json:"subOrgDepth"` } type PermissionCtrl struct { diff --git a/docs/permissions/setup.md b/docs/permissions/setup.md index 644eab6d9..8efc2c48f 100644 --- a/docs/permissions/setup.md +++ b/docs/permissions/setup.md @@ -6,30 +6,30 @@ The steps to enable new permissions model are as described below: * Once all the contracts are deployed create a file `permission-config.json` which will have the following construct: ```$xslt { - "upgrdableAddress": "0x1932c48b2bf8102ba33b4a6b545c32236e342f34", - "interfaceAddress": "0x4d3bfd7821e237ffe84209d8e638f9f309865b87", - "impladdress": "0xfe0602d820f42800e3ef3f89e1c39cd15f78d283", - "nodeMgraddress": "0x8a5e2a6343108babed07899510fb42297938d41f", - "accountMgraddress": "0x9d13c6d3afe1721beef56b55d303b09e021e27ab", - "roleMgraddress": "0x1349f3e1b8d71effb47b840594ff27da7e603d17", - "voterMgraddress": "0xd9d64b7dc034fafdba5dc2902875a67b5d586420", - "orgMgraddress" : "0x938781b9796aea6376e40ca158f67fa89d5d8a18", - "nwAdminOrg": "INITORG", - "nwAdminRole" : "NWADMIN", - "orgAdminRole" : "ORGADMIN", - "accounts":["0xed9d02e382b34818e88b88a309c7fe71e65f419d", "0xca843569e3427144cead5e4d5999a3d0ccf92b8e"], - "subOrgBreadth" : "3", - "subOrgDepth" : "4" + "upgrdableAddress": "0x1932c48b2bf8102ba33b4a6b545c32236e342f34", + "interfaceAddress": "0x4d3bfd7821e237ffe84209d8e638f9f309865b87", + "implAddress": "0xfe0602d820f42800e3ef3f89e1c39cd15f78d283", + "nodeMgrAddress": "0x8a5e2a6343108babed07899510fb42297938d41f", + "accountMgrAddress": "0x9d13c6d3afe1721beef56b55d303b09e021e27ab", + "roleMgrAddress": "0x1349f3e1b8d71effb47b840594ff27da7e603d17", + "voterMgrAddress": "0xd9d64b7dc034fafdba5dc2902875a67b5d586420", + "orgMgrAddress" : "0x938781b9796aea6376e40ca158f67fa89d5d8a18", + "nwAdminOrg": "ADMINORG", + "nwAdminRole" : "ADMIN", + "orgAdminRole" : "ORGADMIN", + "accounts":["0xed9d02e382b34818e88b88a309c7fe71e65f419d", "0xca843569e3427144cead5e4d5999a3d0ccf92b8e"], + "subOrgBreadth" : "3", + "subOrgDepth" : "4" } ``` > * `upgrdableAddress` is the address of deployed contract `PermissionsUpgradable.sol` > * `interfaceAddress` is the address of deployed contract `PermissionsInterface.sol` -> * `impladdress` is the address of deployed contract `PermissionsImplementation.sol` -> * `nodeMgraddress` is the address of deployed contract `NodeManager.sol` -> * `accountMgraddress` is the address of deployed contract `AccountManager.sol` -> * `roleMgraddress` is the address of deployed contract `RoleManager.sol` -> * `voterMgraddress` is the address of deployed contract `VoterManager.sol` -> * `orgMgraddress` is the address of deployed contract `OrgManager.sol` +> * `implAddress` is the address of deployed contract `PermissionsImplementation.sol` +> * `nodeMgrAddress` is the address of deployed contract `NodeManager.sol` +> * `accountMgrAddress` is the address of deployed contract `AccountManager.sol` +> * `roleMgrAddress` is the address of deployed contract `RoleManager.sol` +> * `voterMgrAddress` is the address of deployed contract `VoterManager.sol` +> * `orgMgrAddress` is the address of deployed contract `OrgManager.sol` > * `nwAdminOrg` is the name of initial organization that will be created as a part of network boot up with new permissions model. This organization will own all the initial nodes which come at the time of network boot up and accounts which will be the network admin account > * `nwAdminRole` is role id for which will have full access and will be network admin > * `accounts` holds the initial list of accounts which will be linked to the network admin organization and will be assigned the network admin role. These accounts will have complete control on the network and can propose and approve new organizations into the network