From 63f5ca6334fee5d6647f52f670434e6e9e9a2e98 Mon Sep 17 00:00:00 2001 From: dglowinski Date: Wed, 20 Mar 2024 15:03:48 +0100 Subject: [PATCH] allow pause guardian or governor to call setDisabledOps --- src/EVault/modules/Governance.sol | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/EVault/modules/Governance.sol b/src/EVault/modules/Governance.sol index 526e83cb..9f927eda 100644 --- a/src/EVault/modules/Governance.sol +++ b/src/EVault/modules/Governance.sol @@ -38,8 +38,10 @@ abstract contract GovernanceModule is IGovernance, Base, BalanceUtils, BorrowUti _; } - modifier pauseGuardianOnly() { - if (msg.sender != marketStorage.pauseGuardian) revert E_Unauthorized(); + modifier governorOrPauseGuardianOnly() { + if (msg.sender != marketStorage.governorAdmin && msg.sender != marketStorage.pauseGuardian) { + revert E_Unauthorized(); + } _; } @@ -246,7 +248,7 @@ abstract contract GovernanceModule is IGovernance, Base, BalanceUtils, BorrowUti } /// @inheritdoc IGovernance - function setDisabledOps(uint32 newDisabledOps) public virtual nonReentrant pauseGuardianOnly { + function setDisabledOps(uint32 newDisabledOps) public virtual nonReentrant governorOrPauseGuardianOnly { // market is updated because: // if disabling interest accrual - the pending interest should be accrued // if re-enabling interest - last updated timestamp needs to be reset to skip the disabled period