Skip to main content

_requirePermissionAllowingOverride

Contract: JBOperatable​‌

Require the message sender is either the account, has the specified permission, or the override condition is true.

Definition

function _requirePermissionAllowingOverride(
address _account,
uint256 _domain,
uint256 _permissionIndex,
bool _override
) 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.
    • _override is the override condition to allow.
  • The resulting function is internal to this contract and its inheriters.
  • The function doesn't return anything.

Body

  1. Make sure the override flag is on, or 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 (
    !_override &&
    msg.sender != _account &&
    !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) &&
    !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex)
    ) revert UNAUTHORIZED();

    Internal references:

    External references: