Skip to content

Commit

Permalink
Revert "chore: allow manager to grant and revoke permissions"
Browse files Browse the repository at this point in the history
This reverts commit b82cdf2.
  • Loading branch information
blockgroot committed Oct 3, 2024
1 parent b82cdf2 commit 73a1415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/StaderConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ contract StaderConfig is IStaderConfig, AccessControlUpgradeable {
address contractAddress,
string calldata functionSig,
address accountToPermit
) external onlyRole(MANAGER) {
) external onlyRole(DEFAULT_ADMIN_ROLE) {
bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));
grantRole(role, accountToPermit);
emit PermissionGranted(accountToPermit, contractAddress, functionSig);
Expand All @@ -312,7 +312,7 @@ contract StaderConfig is IStaderConfig, AccessControlUpgradeable {
address contractAddress,
string calldata functionSig,
address accountToRevoke
) external onlyRole(MANAGER) {
) external onlyRole(DEFAULT_ADMIN_ROLE) {
bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));
revokeRole(role, accountToRevoke);
emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);

Check warning on line 318 in contracts/StaderConfig.sol

View check run for this annotation

Codecov / codecov/patch

contracts/StaderConfig.sol#L316-L318

Added lines #L316 - L318 were not covered by tests
Expand Down
1 change: 0 additions & 1 deletion test/foundry_tests/SDRewardsManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ contract SDRewardManagerTest is Test {
permissionlessSP.initialize(staderAdmin, address(staderConfig));

vm.startPrank(staderAdmin);
staderConfig.grantRole(staderConfig.MANAGER(), staderAdmin);
staderConfig.updateStaderToken(address(staderToken));
staderConfig.updatePermissionlessSocializingPool(address(permissionlessSP));
staderConfig.giveCallPermission(address(rewardManager), "addRewardEntry(uint256,uint256)", user1);
Expand Down

0 comments on commit 73a1415

Please sign in to comment.