@@ -27,13 +27,7 @@ contract SystemStatus is Owned, ISystemStatus {
27
27
28
28
mapping (bytes32 => Suspension) public synthSuspension;
29
29
30
- constructor (address _owner ) public Owned (_owner) {
31
- _internalUpdateAccessControl (SECTION_SYSTEM, _owner, true , true );
32
- _internalUpdateAccessControl (SECTION_ISSUANCE, _owner, true , true );
33
- _internalUpdateAccessControl (SECTION_EXCHANGE, _owner, true , true );
34
- _internalUpdateAccessControl (SECTION_SYNTH_EXCHANGE, _owner, true , true );
35
- _internalUpdateAccessControl (SECTION_SYNTH, _owner, true , true );
36
- }
30
+ constructor (address _owner ) public Owned (_owner) {}
37
31
38
32
/* ========== VIEWS ========== */
39
33
function requireSystemActive () external view {
@@ -133,6 +127,23 @@ contract SystemStatus is Owned, ISystemStatus {
133
127
_internalUpdateAccessControl (section, account, canSuspend, canResume);
134
128
}
135
129
130
+ function updateAccessControls (
131
+ bytes32 [] calldata sections ,
132
+ address [] calldata accounts ,
133
+ bool [] calldata canSuspends ,
134
+ bool [] calldata canResumes
135
+ ) external onlyOwner {
136
+ require (
137
+ sections.length == accounts.length &&
138
+ accounts.length == canSuspends.length &&
139
+ canSuspends.length == canResumes.length ,
140
+ "Input array lengths must match "
141
+ );
142
+ for (uint i = 0 ; i < sections.length ; i++ ) {
143
+ _internalUpdateAccessControl (sections[i], accounts[i], canSuspends[i], canResumes[i]);
144
+ }
145
+ }
146
+
136
147
function suspendSystem (uint256 reason ) external {
137
148
_requireAccessToSuspend (SECTION_SYSTEM);
138
149
systemSuspension.suspended = true ;
0 commit comments