permission: update contracts

This commit is contained in:
amalraj.manigmail.com 2019-03-29 16:47:14 +08:00
parent e6c8e64c35
commit 69f544a415
3 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ contract NodeManager {
require(checkOrg(_enodeId, _orgId), "Node does not belong to the org");
// changing node status to integer (0-NotInList, 1- PendingApproval, 2-Approved, 3-Deactivated, 4-Blacklisted)
// operations that can be done 3-Deactivate Node, 4-ActivateNode, 5-Blacklist nodeList
require((_status == 3 || _status == 4 || _status == 5), "invalid operation");
require((_status == 2 || _status == 3 || _status == 4 || _status == 5), "invalid operation");
if (_status == 3){
require(getNodeStatus(_enodeId) == 2, "Op cannot be performed");

View File

@ -195,10 +195,10 @@ contract PermissionsImplementation {
roles.addRole(_roleId, _orgId, _access, _voter);
}
function removeRole(string calldata _roleId, string calldata _orgId) external
function removeRole(string calldata _roleId, string calldata _orgId, address _caller) external
onlyProxy
orgApproved(_orgId)
orgAdmin(msg.sender, _orgId)
orgAdmin(_caller, _orgId)
{
roles.removeRole(_roleId, _orgId);
}

View File

@ -98,7 +98,7 @@ contract PermissionsInterface {
function removeRole(string calldata _roleId, string calldata _orgId) external
{
permImplementation.removeRole(_roleId, _orgId);
permImplementation.removeRole(_roleId, _orgId, msg.sender);
}
function getRoleDetails(string calldata _roleId, string calldata _orgId) external view returns (string memory, string memory, uint, bool, bool)