public function getEffectiveRolesForUser($user)
    {
        if (isset($user['roles']) && is_array($user['roles'])) {
            $userRoles = $user['roles'];
            $userRoles[] = self::ROLE_EVERYONE;
        } else {
            $userRoles = [];
        }
        $userRoles[] = self::ROLE_ANONYMOUS;

        return $userRoles;
    }