Example is in MediationController->roundTableCommunication.
This should do dispute->state->canEnableRoundTableCommunication($account). Delegate the business logic to the state pattern, don't encode it in the controller. This principle needs to be applied elsewhere too.
(At the moment, it manually checks if the logged in account is a mediator. Controller shouldn't need to care).
Example is in MediationController->roundTableCommunication.
This should do dispute->state->canEnableRoundTableCommunication($account). Delegate the business logic to the state pattern, don't encode it in the controller. This principle needs to be applied elsewhere too.
(At the moment, it manually checks if the logged in account is a mediator. Controller shouldn't need to care).