X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ffilter_auth_simple.cpp;h=f48dd157606a8a8eef6f07858d67c46474e2a783;hb=47f540947520045b8d72cd8b4d7543a48093cc37;hp=dca3558663dd49d627aa220cb861081947640b7b;hpb=e1c7fdb3e2ff41fb43ea3dd2c540b6d568dee851;p=metaproxy-moved-to-github.git diff --git a/src/filter_auth_simple.cpp b/src/filter_auth_simple.cpp index dca3558..f48dd15 100644 --- a/src/filter_auth_simple.cpp +++ b/src/filter_auth_simple.cpp @@ -1,7 +1,22 @@ -/* $Id: filter_auth_simple.cpp,v 1.21 2006-08-30 12:27:34 adam Exp $ - Copyright (c) 2005-2006, Index Data. +/* $Id: filter_auth_simple.cpp,v 1.24 2007-05-23 14:24:10 adam Exp $ + Copyright (c) 2005-2007, Index Data. - See the LICENSE file for details +This file is part of Metaproxy. + +Metaproxy is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Metaproxy; see the file LICENSE. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include "config.hpp" @@ -342,8 +357,8 @@ void yf::AuthSimple::check_targets(mp::Package & package) const std::list authorisedTargets = m_p->targetsByUser[user]; std::list targets; - Z_OtherInformation *otherInfo = initReq->otherInfo; - mp::util::get_vhost_otherinfo(otherInfo, targets); + Z_OtherInformation **otherInfo = &initReq->otherInfo; + mp::util::remove_vhost_otherinfo(otherInfo, targets); // Check each of the targets specified in the otherInfo package std::list::iterator i; @@ -366,9 +381,8 @@ void yf::AuthSimple::check_targets(mp::Package & package) const YAZ_BIB1_ACCESS_TO_SPECIFIED_DATABASE_DENIED, // ### It would be better to use the Z-db name "all databases"); - mp::odr odr; - mp::util::set_vhost_otherinfo(&otherInfo, odr, targets); + mp::util::set_vhost_otherinfo(otherInfo, odr, targets); package.move(); }