Skip to main content


Contract: JBOperatable​‌

Require the message sender is either the account or has the specified permission.


function _requirePermission(
address _account,
uint256 _domain,
uint256 _permissionIndex
) internal view { ... }
  • Arguments:
    • _account is the account to allow.
    • _domain is the domain namespace within which the permission index will be checked.
    • _permissionIndex is the permission index that an operator must have within the specified domain to be allowed.
  • The resulting function is internal to this contract and its inheriters.
  • The function doesn't return anything.


  1. Make sure the message sender is the specified account, an operator of the account within the specified domain, or an operator of the account within the wildcard domain.

    if (
    msg.sender != _account &&
    !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) &&
    !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex)
    ) revert UNAUTHORIZED();

    Internal references:

    External references: