# AdminControlled

[Git Source](https://github.com/EntreDevelopers-Lab-Inc/Mezz-Companies/blob/f7a3e84e3dd5bb33c4bd7f77283983f9e8ba20b2/src/core/base/AdminControlled.sol)

**Inherits:** BoardControlled, IAdminControlled

**Author:** Daniel Yamagata

A base contract that is inherited by contracts meant to be controlled by a company's board of directors and a set of admins

## State Variables

### AdminControlledStorageLocation

```solidity
bytes32 private constant AdminControlledStorageLocation =
    0xe8d3a2e05e64290a0f2256f86af6161ca7eebf433b9b144d23028b2415816200;
```

## Functions

### \_getAdminControlledStorage

```solidity
function _getAdminControlledStorage() internal pure returns (AdminControlledStorage storage $);
```

### onlyAdmin

*Reverts if the caller is not the board or an admin*

```solidity
modifier onlyAdmin();
```

### addAdmin

Adds 'adminToAdd' to the list of admins

```solidity
function addAdmin(address adminToAdd) external onlyBoard;
```

### removeAdmin

Removes 'adminToRemove' from the list of admins

```solidity
function removeAdmin(address adminToRemove) external onlyBoard;
```

### isAdmin

Returns true if the 'adminToCheck' is part of the admins set

```solidity
function isAdmin(address adminToCheck) public view returns (bool);
```

### getAdmins

Returns the list of admins

```solidity
function getAdmins() public view returns (address[] memory);
```

### \_validateCallerIsBoardOrAdmin

*Reverts if the caller is not the board or an admin*

```solidity
function _validateCallerIsBoardOrAdmin() internal view virtual;
```

### \_isCallerBoardOrAdmin

*Returns true if the caller is the board or an admin*

```solidity
function _isCallerBoardOrAdmin() internal view virtual returns (bool);
```

## Structs

### AdminControlledStorage

```solidity
struct AdminControlledStorage {
    EnumerableSet.AddressSet _admins;
}
```
