discardUnauthorisedDBs -> discardUnauthorisedTargets
authorMike Taylor <mike@indexdata.com>
Wed, 18 Jan 2006 15:05:57 +0000 (15:05 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 18 Jan 2006 15:05:57 +0000 (15:05 +0000)
etc/config-zurg.xml
etc/config.xsd
src/filter_auth_simple.cpp

index a74ba3a..def5522 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- $Id: config-zurg.xml,v 1.7 2006-01-18 15:04:06 mike Exp $ -->
+<!-- $Id: config-zurg.xml,v 1.8 2006-01-18 15:05:57 mike Exp $ -->
 <yp2 xmlns="http://indexdata.dk/yp2/config/1">
   <start route="start"/>
   <filters>
@@ -68,7 +68,7 @@
       </filter>
       <filter type="auth_simple">
         <targetRegister>../etc/example.target-auth</targetRegister>
-       <discardUnauthorisedDBs/>
+       <discardUnauthorisedTargets/>
       </filter>
       <filter type="multi">
       </filter>
index ceb05ed..f35db43 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: config.xsd,v 1.11 2006-01-18 14:12:50 mike Exp $ -->
+<!-- $Id: config.xsd,v 1.12 2006-01-18 15:06:12 mike Exp $ -->
 <!--
        This Schema prescribes the format of YP2 configuration files.
        Invoke it like this:
@@ -67,7 +67,7 @@
         <xs:sequence>
          <xs:element minOccurs="0" ref="config:userRegister"/>
          <xs:element minOccurs="0" ref="config:targetRegister"/>
-         <xs:element minOccurs="0" name="discardUnauthorisedDBs">
+         <xs:element minOccurs="0" name="discardUnauthorisedTargets">
            <xs:complexType/>
          </xs:element>
         </xs:sequence>
   <xs:element name="message" type="xs:NCName"/>
   <xs:element name="userRegister" type="xs:string"/>
   <xs:element name="targetRegister" type="xs:string"/>
-  <xs:element name="discardUnauthorisedDBs" type="xs:string"/>
+  <xs:element name="discardUnauthorisedTargets" type="xs:string"/>
 
   <!-- ### This is used differently depending on whether it occurs
        within a "virt_db" or "multi" filter: for the former, it
index 144595f..33a94fa 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: filter_auth_simple.cpp,v 1.16 2006-01-18 15:03:02 mike Exp $
+/* $Id: filter_auth_simple.cpp,v 1.17 2006-01-18 15:07:09 mike Exp $
    Copyright (c) 2005, Index Data.
 
 %LICENSE%
@@ -38,10 +38,10 @@ namespace yp2 {
             std::map<std::string, PasswordAndDBs> userRegister;
             std::map<std::string, std::list<std::string> > targetsByUser;
             std::map<yp2::Session, std::string> userBySession;
-            bool discardUnauthorisedDBs;
+            bool discardUnauthorisedTargets;
             Rep() { got_userRegister = false;
                     got_targetRegister = false;
-                    discardUnauthorisedDBs = false; }
+                    discardUnauthorisedTargets = false; }
         };
     }
 }
@@ -75,8 +75,8 @@ void yp2::filter::AuthSimple::configure(const xmlNode * ptr)
             targetRegisterName = yp2::xml::get_text(ptr);
             m_p->got_targetRegister = true;
         } else if (!strcmp((const char *) ptr->name,
-                           "discardUnauthorisedDBs")) {
-            m_p->discardUnauthorisedDBs = true;
+                           "discardUnauthorisedTargets")) {
+            m_p->discardUnauthorisedTargets = true;
         } else {
             die("Bad element in auth_simple: <"
                 + std::string((const char *) ptr->name) + ">");
@@ -352,7 +352,7 @@ void yf::AuthSimple::check_targets(yp2::Package & package) const
             contains(authorisedTargets, "*")) {
             i++;
         } else {
-            if (!m_p->discardUnauthorisedDBs)
+            if (!m_p->discardUnauthorisedTargets)
                 return reject_init(package,
                     YAZ_BIB1_ACCESS_TO_SPECIFIED_DATABASE_DENIED, i->c_str());
             i = targets.erase(i);