protected function _getRoleIds()
    {
        $ids = [];
        if (!$this->has('roles')) {
            return $ids;
        }
        foreach ($this->roles as $k => $role) {
            $ids[] = $role->id;
        }

        return $ids;
    }