onlyController
Contract: JBControllerUtility
- Step by step
 - Code
 - Bug bounty
 
Only allows the controller of the specified project to proceed.
Definition
modifier onlyController(uint256 _projectId) { ... }
- Arguments:
_projectIdis the ID of the project.
 - The modifier function can be used by any internal function.
 
Body
- 
Make sure the message's sender is the project's controller.
if (address(directory.controllerOf(_projectId)) != msg.sender) revert CONTROLLER_UNAUTHORIZED();Internal references:
External references:
 - 
Continue the rest of the function.
_; 
/**
  @notice
  Only allows the controller of the specified project to proceed.
  @param _projectId The ID of the project.
*/
modifier onlyController(uint256 _projectId) {
  if (address(directory.controllerOf(_projectId)) != msg.sender) revert CONTROLLER_UNAUTHORIZED();
  _;
}
| Category | Description | Reward | 
|---|---|---|
| Optimization | Help make this operation more efficient. | 0.5ETH | 
| Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH | 
| High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |