Improve encapsulation on SignatureBouncer, Whitelist and RBAC example (#1265)
* Improve encapsulation on Whitelist * remove only * update whitelisted crowdsale test * Improve encapsulation on SignatureBouncer * fix missing test * Improve encapsulation on RBAC example * Improve encapsulation on RBAC example * Remove extra visibility * Improve encapsulation on ERC20 Mintable * Improve encapsulation on Superuser * fix lint * add missing constant
This commit is contained in:
committed by
Francisco Giordano
parent
b0f20d43df
commit
f4eb51a7e9
@ -19,7 +19,7 @@ contract RBACWithAdmin is RBAC {
|
||||
/**
|
||||
* A constant role name for indicating admins.
|
||||
*/
|
||||
string public constant ROLE_ADMIN = "admin";
|
||||
string private constant ROLE_ADMIN = "admin";
|
||||
|
||||
/**
|
||||
* @dev modifier to scope access to admins
|
||||
@ -40,6 +40,13 @@ contract RBACWithAdmin is RBAC {
|
||||
_addRole(msg.sender, ROLE_ADMIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the account is admin, false otherwise.
|
||||
*/
|
||||
function isAdmin(address _account) public view returns(bool) {
|
||||
return hasRole(_account, ROLE_ADMIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev add a role to an account
|
||||
* @param _account the account that will have the role
|
||||
|
||||
Reference in New Issue
Block a user