@@ -22,6 +22,7 @@ contract ejectImplant is BaseImplant {
2222 address public immutable FAIL_SAFE;
2323 bool public immutable ALLOW_AUTH_MANAGEMENT;
2424 bool public immutable ALLOW_AUTH_EJECT;
25+ bool public immutable ALLOW_AUTH_SELF_EJECT_REDUCE;
2526 uint256 public failSafeSignerThreshold;
2627
2728 // Errors and Events
@@ -40,12 +41,13 @@ contract ejectImplant is BaseImplant {
4041
4142 /// @param _auth initialize authorization parameters for this contract, including applicable conditions
4243 /// @param _borgSafe address of the applicable BORG's Gnosis Safe which is adding this ejectImplant
43- constructor (BorgAuth _auth , address _borgSafe , address _failSafe , bool _allowManagement , bool _allowEjection ) BaseImplant (_auth, _borgSafe) {
44+ constructor (BorgAuth _auth , address _borgSafe , address _failSafe , bool _allowManagement , bool _allowEjection , bool _allowSelfEjectReduce ) BaseImplant (_auth, _borgSafe) {
4445 if (IBaseImplant (_failSafe).IMPLANT_ID () != 0 )
4546 revert ejectImplant_InvalidFailSafeImplant ();
4647 FAIL_SAFE = _failSafe;
4748 ALLOW_AUTH_MANAGEMENT = _allowManagement;
4849 ALLOW_AUTH_EJECT = _allowEjection;
50+ ALLOW_AUTH_SELF_EJECT_REDUCE = _allowSelfEjectReduce;
4951 }
5052
5153 /// @notice setFailSafeSignerThreshold for the DAO or oversight BORG to set the maximum threshold for the fail safe to be triggered
@@ -193,6 +195,7 @@ contract ejectImplant is BaseImplant {
193195 /// @param _reduce boolean to reduce the threshold if the owner is the last to self-eject
194196 function selfEject (bool _reduce ) public conditionCheck {
195197 if (! ISafe (BORG_SAFE).isOwner (msg .sender )) revert ejectImplant_NotOwner ();
198+ if (_reduce && ! ALLOW_AUTH_SELF_EJECT_REDUCE) revert ejectImplant_ActionNotEnabled ();
196199
197200 address [] memory owners = ISafe (BORG_SAFE).getOwners ();
198201 address prevOwner = address (0x1 );
0 commit comments