<?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>
</filter>
<filter type="auth_simple">
<targetRegister>../etc/example.target-auth</targetRegister>
- <discardUnauthorisedDBs/>
+ <discardUnauthorisedTargets/>
</filter>
<filter type="multi">
</filter>
<?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:
<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
-/* $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%
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; }
};
}
}
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) + ">");
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);