permissions: Documentation update

This commit is contained in:
vsmk98 2019-05-08 18:53:51 +08:00
parent 0ce58c23c3
commit 9d86b30494
2 changed files with 34 additions and 34 deletions

View File

@ -34,21 +34,21 @@ const (
// permission config for bootstrapping // permission config for bootstrapping
type PermissionLocalConfig struct { type PermissionLocalConfig struct {
UpgrdAddress string UpgrdAddress string `json:"upgrdableAddress"`
InterfAddress string InterfAddress string `json:"interfaceAddress"`
ImplAddress string ImplAddress string `json:"implAddress"`
NodeAddress string NodeAddress string `json:"nodeMgrAddress"`
AccountAddress string AccountAddress string `json:"accountMgrAddress"`
RoleAddress string RoleAddress string `json:"roleMgrAddress"`
VoterAddress string VoterAddress string `json:"voterMgrAddress"`
OrgAddress string OrgAddress string `json:"orgMgrAddress"`
NwAdminOrg string NwAdminOrg string `json:"nwAdminOrg"`
NwAdminRole string NwAdminRole string `json:"nwAdminRole"`
OrgAdminRole string OrgAdminRole string `json:"orgAdminRole"`
Accounts []string //initial list of account that need full access Accounts []string `json:"accounts"` //initial list of account that need full access
SubOrgBreadth string SubOrgBreadth string `json:"subOrgBreadth"`
SubOrgDepth string SubOrgDepth string `json:"subOrgDepth"`
} }
type PermissionCtrl struct { type PermissionCtrl struct {

View File

@ -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: * Once all the contracts are deployed create a file `permission-config.json` which will have the following construct:
```$xslt ```$xslt
{ {
"upgrdableAddress": "0x1932c48b2bf8102ba33b4a6b545c32236e342f34", "upgrdableAddress": "0x1932c48b2bf8102ba33b4a6b545c32236e342f34",
"interfaceAddress": "0x4d3bfd7821e237ffe84209d8e638f9f309865b87", "interfaceAddress": "0x4d3bfd7821e237ffe84209d8e638f9f309865b87",
"impladdress": "0xfe0602d820f42800e3ef3f89e1c39cd15f78d283", "implAddress": "0xfe0602d820f42800e3ef3f89e1c39cd15f78d283",
"nodeMgraddress": "0x8a5e2a6343108babed07899510fb42297938d41f", "nodeMgrAddress": "0x8a5e2a6343108babed07899510fb42297938d41f",
"accountMgraddress": "0x9d13c6d3afe1721beef56b55d303b09e021e27ab", "accountMgrAddress": "0x9d13c6d3afe1721beef56b55d303b09e021e27ab",
"roleMgraddress": "0x1349f3e1b8d71effb47b840594ff27da7e603d17", "roleMgrAddress": "0x1349f3e1b8d71effb47b840594ff27da7e603d17",
"voterMgraddress": "0xd9d64b7dc034fafdba5dc2902875a67b5d586420", "voterMgrAddress": "0xd9d64b7dc034fafdba5dc2902875a67b5d586420",
"orgMgraddress" : "0x938781b9796aea6376e40ca158f67fa89d5d8a18", "orgMgrAddress" : "0x938781b9796aea6376e40ca158f67fa89d5d8a18",
"nwAdminOrg": "INITORG", "nwAdminOrg": "ADMINORG",
"nwAdminRole" : "NWADMIN", "nwAdminRole" : "ADMIN",
"orgAdminRole" : "ORGADMIN", "orgAdminRole" : "ORGADMIN",
"accounts":["0xed9d02e382b34818e88b88a309c7fe71e65f419d", "0xca843569e3427144cead5e4d5999a3d0ccf92b8e"], "accounts":["0xed9d02e382b34818e88b88a309c7fe71e65f419d", "0xca843569e3427144cead5e4d5999a3d0ccf92b8e"],
"subOrgBreadth" : "3", "subOrgBreadth" : "3",
"subOrgDepth" : "4" "subOrgDepth" : "4"
} }
``` ```
> * `upgrdableAddress` is the address of deployed contract `PermissionsUpgradable.sol` > * `upgrdableAddress` is the address of deployed contract `PermissionsUpgradable.sol`
> * `interfaceAddress` is the address of deployed contract `PermissionsInterface.sol` > * `interfaceAddress` is the address of deployed contract `PermissionsInterface.sol`
> * `impladdress` is the address of deployed contract `PermissionsImplementation.sol` > * `implAddress` is the address of deployed contract `PermissionsImplementation.sol`
> * `nodeMgraddress` is the address of deployed contract `NodeManager.sol` > * `nodeMgrAddress` is the address of deployed contract `NodeManager.sol`
> * `accountMgraddress` is the address of deployed contract `AccountManager.sol` > * `accountMgrAddress` is the address of deployed contract `AccountManager.sol`
> * `roleMgraddress` is the address of deployed contract `RoleManager.sol` > * `roleMgrAddress` is the address of deployed contract `RoleManager.sol`
> * `voterMgraddress` is the address of deployed contract `VoterManager.sol` > * `voterMgrAddress` is the address of deployed contract `VoterManager.sol`
> * `orgMgraddress` is the address of deployed contract `OrgManager.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 > * `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 > * `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 > * `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