public function changeEnvironmentRole(Environment $environment, $newRole)
    {
        $access = $environment->getUser($this->id);
        if ($access) {
            if ($access->role === $newRole) {
                throw new \InvalidArgumentException("There is nothing to change");
            }

            return $access->update(['role' => $newRole]);
        }

        return $environment->addUser($this->id, $newRole);
    }