AccessModifiers
Inherits: [FacetUtils](/v2(/v2/reference/engine/facets/FacetUtils.sol/contract.FacetUtils)
Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
This contract is a critical component of the Rules Engine, enabling secure and flexible access control.
This contract contains all the access modifiers used across the Rules Engine. These modifiers enforce role-based access control for various operations, ensuring that only authorized users can execute specific functions. It is inherited by all Engine facets to provide consistent access control mechanisms.
Functions
policyAdminOnly
Ensures that the function caller is a Policy Admin for the specified policy.
This modifier checks if the caller has the Policy Admin role for the given policy ID by delegating the check to another facet. If the caller is not authorized, the transaction is reverted.
Parameters
Name | Type | Description |
---|---|---|
_policyId | uint256 | The ID of the policy to check. |
_address | address | The address of the user to verify. |
callingContractAdminOnly
Ensures that the function caller is a Calling Contract Admin for the specified contract.
This modifier checks if the caller has the Calling Contract Admin role for the given contract address by delegating the check to another facet. If the caller is not authorized, the transaction is reverted.
Parameters
Name | Type | Description |
---|---|---|
_callingContract | address | The address of the calling contract to check. |
_address | address | The address of the user to verify. |