Changed SSL port because of a port conflict between SSL and non SSL that I
don't understand. Added method outputHttpSource to DirectoryHolder. Removed class Identities. Converted PasswordAccounts to PasswordAccountsHolder.
This commit is contained in:
parent
a342c06d93
commit
99c2db5c3a
|
@ -33,7 +33,7 @@
|
|||
</virtualHost>
|
||||
|
||||
<sslVirtualHost>
|
||||
<port>2002</port>
|
||||
<port>1998</port>
|
||||
<serverName>localhost</serverName>
|
||||
<title>Abracadabra</title>
|
||||
<documentRoot>vhosts/abracadabra/</documentRoot>
|
||||
|
|
|
@ -358,6 +358,9 @@ Unknown file name extension = "%s", length = %d, for file "%s" at "%s".\
|
|||
randomGenerator = whrandom.whrandom()
|
||||
return str(randomGenerator.uniform(0.1, 1))[2:]
|
||||
|
||||
def outputHttpSource(self):
|
||||
raise faults.PathForbidden("")
|
||||
|
||||
## def save(self):
|
||||
## fileSystem = self.fileSystem
|
||||
## fileSystemPath = self.getFileSystemPath()
|
||||
|
|
|
@ -77,37 +77,6 @@ class Identifications(elements.List):
|
|||
pass
|
||||
|
||||
|
||||
class Identities(directories.Directory):
|
||||
# FIXME: TODO:Transform to an IdentitiesHolder.
|
||||
def checkLocalNameIdentifier(self, providerId, localNameIdentifier):
|
||||
for identityLocalId in self.getItemLocalIds():
|
||||
identityHolder = self.getItem(identityLocalId)
|
||||
identity = identityHolder.getRootElement()
|
||||
identifications = identity.identifications
|
||||
if identifications is None:
|
||||
continue
|
||||
for identification in identifications:
|
||||
if identification.providerId == providerId \
|
||||
and identification.localNameIdentifier \
|
||||
== localNameIdentifier:
|
||||
return identity
|
||||
return None
|
||||
|
||||
def checkPeerNameIdentifier(self, providerId, peerNameIdentifier):
|
||||
for identityLocalId in self.getItemLocalIds():
|
||||
identityHolder = self.getItem(identityLocalId)
|
||||
identity = identityHolder.getRootElement()
|
||||
identifications = identity.identifications
|
||||
if identifications is None:
|
||||
continue
|
||||
for identification in identifications:
|
||||
if identification.providerId == providerId \
|
||||
and identification.peerNameIdentifier \
|
||||
== peerNameIdentifier:
|
||||
return identity
|
||||
return None
|
||||
|
||||
|
||||
class Identity(things.Thing):
|
||||
_session = None
|
||||
|
||||
|
@ -256,10 +225,6 @@ class Identity(things.Thing):
|
|||
|
||||
elements.registerElement(namespaces.yep.uri, "identification", Identification)
|
||||
elements.registerElement(namespaces.yep.uri, "identifications", Identifications)
|
||||
elements.registerElement(
|
||||
namespaces.yep.uri, "identities", Identities,
|
||||
"http://www.entrouvert.org/expression/schemas/Directory.xsd",
|
||||
"http://www.entrouvert.org/expression/descriptions/Directory.xml")
|
||||
elements.registerElement(
|
||||
namespaces.yep.uri, "identity", Identity,
|
||||
"http://www.entrouvert.org/expression/schemas/Identity.xsd",
|
||||
|
|
|
@ -295,7 +295,7 @@ class PasswordAccountHolder(dataholders.XmlHolder):
|
|||
publicName = property(getPublicName, setPublicName, deletePublicName)
|
||||
|
||||
|
||||
class PasswordAccounts(directories.Directory):
|
||||
class PasswordAccountsHolder(directories.DirectoryHolder):
|
||||
def login(self, *uriPathFragments):
|
||||
"""
|
||||
Handles HTTP GET.
|
||||
|
@ -319,7 +319,3 @@ elements.registerElement(
|
|||
namespaces.yep.uri, "passwordAccount", PasswordAccount,
|
||||
"http://www.entrouvert.org/expression/schemas/PasswordAccount.xsd",
|
||||
"http://www.entrouvert.org/expression/descriptions/PasswordAccount.xml", PasswordAccountHolder)
|
||||
elements.registerElement(
|
||||
namespaces.yep.uri, "passwordAccounts", PasswordAccounts,
|
||||
"http://www.entrouvert.org/expression/schemas/Directory.xsd",
|
||||
"http://www.entrouvert.org/expression/descriptions/Directory.xml")
|
||||
|
|
Reference in New Issue