manager should call only by execute

This commit is contained in:
Ricardo Guilherme Schmidt 2018-02-22 05:16:06 -03:00
parent 310f4b8f5a
commit bab9e88c1a
1 changed files with 11 additions and 8 deletions

View File

@ -31,11 +31,8 @@ contract Identity is ERC725, ERC735 {
_;
}
modifier managerOrSelf {
require(
isKeyType(bytes32(msg.sender), MANAGEMENT_KEY) ||
msg.sender == address(this)
);
modifier selfOnly {
require(msg.sender == address(this));
_;
}
@ -68,7 +65,7 @@ contract Identity is ERC725, ERC735 {
uint256 _type
)
public
managerOrSelf
selfOnly
returns (bool success)
{
_addKey(_key, _purpose, _type);
@ -80,7 +77,7 @@ contract Identity is ERC725, ERC735 {
uint256 _purpose
)
public
managerOrSelf
selfOnly
returns (bool success)
{
_removeKey(_key, _purpose);
@ -140,7 +137,13 @@ contract Identity is ERC725, ERC735 {
}
function setMiminumApprovalsByKeyType(uint256 _type, uint8 _minimumApprovals) public managerOrSelf {
function setMiminumApprovalsByKeyType(
uint256 _type,
uint8 _minimumApprovals
)
public
selfOnly
{
minimumApprovalsByKeyType[_type] = _minimumApprovals;
}