Commit 5dfa37db authored by Jim Fulton's avatar Jim Fulton

Added (incomplete) code to handle "anonymous" users.

parent 344f978f
"""Access control package""" """Access control package"""
__version__='$Revision: 1.25 $'[11:-2] __version__='$Revision: 1.26 $'[11:-2]
import Globals import Globals
from Persistence import Persistent from Persistence import Persistent
...@@ -135,6 +135,9 @@ class UserFolder(Persistent, Item, Implicit, Management): ...@@ -135,6 +135,9 @@ class UserFolder(Persistent, Item, Implicit, Management):
return self.validRoles() return self.validRoles()
def validate(self,request,auth,roles=None): def validate(self,request,auth,roles=None):
if auth is None:
# Handle "anonymous" users:
return None
if lower(auth[:6])!='basic ': if lower(auth[:6])!='basic ':
return None return None
[name,password]=split(decodestring(split(auth)[-1]), ':') [name,password]=split(decodestring(split(auth)[-1]), ':')
...@@ -268,6 +271,9 @@ class UserFolderHandler: ...@@ -268,6 +271,9 @@ class UserFolderHandler:
# $Log: User.py,v $ # $Log: User.py,v $
# Revision 1.26 1997/12/31 13:34:34 jim
# Added (incomplete) code to handle "anonymous" users.
#
# Revision 1.25 1997/12/23 21:09:45 jim # Revision 1.25 1997/12/23 21:09:45 jim
# Made REQUEST argument to addUserFolder optional. # Made REQUEST argument to addUserFolder optional.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment