requirePermission
Contract: JBOperatable
- Step by step
- Code
- Bug bounty
Only allows the speficied account or an operator of the account to proceed.
Definition
modifier requirePermission(
address _account,
uint256 _domain,
uint256 _permissionIndex
) { ... }
- Arguments:
_projectId
is the ID of the project.
- The modifier function can be used by any internal function.
Body
-
Make sure the message's sender fulfills the criteria.
_requirePermission(_account, _domain, _permissionIndex);
Internal references:
-
Continue the rest of the function.
_;
/**
@notice
Only allows the speficied account or an operator of the account to proceed.
@param _account The account to check for.
@param _domain The domain namespace to look for an operator within.
@param _permissionIndex The index of the permission to check for.
*/
modifier requirePermission(
address _account,
uint256 _domain,
uint256 _permissionIndex
) {
_requirePermission(_account, _domain, _permissionIndex);
_;
}
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 |