contract Managed is Ownable, RBAC {
  string public constant ROLE_MANAGER = "manager";

  /**
  * @dev Throws if operator is not whitelisted.
  */
  modifier onlyManager() {
    checkRole(msg.sender, ROLE_MANAGER);
    _;
  }

  /**
  * @dev set an address as a manager
  * @param _operator address
  * @return true if the address was added to the whitelist, false if the address was already in the whitelist
  */
  function setManager(address _operator) public onlyOwner {
    addRole(_operator, ROLE_MANAGER);
  }

  /**
  * @dev delete an address as a manager
  * @param _operator address
  * @return true if the address was deleted from the whitelist, false if the address wasn't already in the whitelist
  */
  function removeManager(address _operator) public onlyOwner {
    removeRole(_operator, ROLE_MANAGER);
  }
}
/**
 * @title Managed
 * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.
 * This simplifies the implementation of "user permissions".
 */
function setManager(address _operator) public onlyOwner {
  addRole(_operator, ROLE_MANAGER);
}

/**
 * @dev set an address as a manager
 * @param _operator address
 * @return true if the address was added to the whitelist, false if the address was already in the whitelist
 */