mirror of https://github.com/poanetwork/quorum.git
permissions: modified implementation contract for creating orgadmin role, added status to account access modified event
This commit is contained in:
parent
ca499fb30b
commit
07f26bdb6c
|
@ -22,7 +22,7 @@ contract AccountManager {
|
|||
mapping(bytes32 => bool) private orgAdminIndex;
|
||||
|
||||
// account permission events
|
||||
event AccountAccessModified(address _address, string _orgId, string _roleId, bool _orgAdmin);
|
||||
event AccountAccessModified(address _address, string _orgId, string _roleId, bool _orgAdmin, uint _status);
|
||||
event AccountAccessRevoked(address _address, string _orgId, string _roleId, bool _orgAdmin);
|
||||
|
||||
modifier onlyImpl
|
||||
|
@ -95,7 +95,7 @@ contract AccountManager {
|
|||
if (_oAdmin) {
|
||||
orgAdminIndex[keccak256(abi.encodePacked(_orgId))] = true;
|
||||
}
|
||||
emit AccountAccessModified(_address, _orgId, _roleId, _oAdmin);
|
||||
emit AccountAccessModified(_address, _orgId, _roleId, _oAdmin, _status);
|
||||
}
|
||||
|
||||
function addNWAdminAccount(address _address, string calldata _orgId) external
|
||||
|
@ -132,7 +132,7 @@ contract AccountManager {
|
|||
(status == 1)) {
|
||||
uint aIndex = getAcctIndex(_address);
|
||||
acctAccessList[aIndex].status = 2;
|
||||
emit AccountAccessModified(_address, acctAccessList[aIndex].orgId, acctAccessList[aIndex].role, acctAccessList[aIndex].orgAdmin);
|
||||
emit AccountAccessModified(_address, acctAccessList[aIndex].orgId, acctAccessList[aIndex].role, acctAccessList[aIndex].orgAdmin, acctAccessList[aIndex].status);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ contract PermissionsImplementation {
|
|||
require(checkOrgStatus(_orgId, 1) == true, "Nothing to approve");
|
||||
if ((processVote(adminOrg, _caller, 1))) {
|
||||
org.approveOrg(_orgId);
|
||||
roles.addRole(orgAdminRole, _orgId, fullAccess, true);
|
||||
nodes.approveNode(_enodeId, _orgId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue