[Zope-CMF] cannot get authenticated user
Rocky Mazzeo
rjmazzeo@hotmail.com
Fri, 18 Oct 2002 10:26:57 -0700
Under the hood question:
I'm trying to extend Products.CMFCore.SkinsTool for a personal project.
Basically I want to over-ride getSkinByName to run little logic and return
the skin based on Role/Permission/URL.
I am running into a stumbling block in that 'getSecurityManager.getUser()'
is always returning the Anonymous User. I removed the CookieCrumbler (hoping
it was just that it hadn't been called yet), but even standard HTTP
Authentication Headers are returning the Anonymous User.
Is it possible to get the User object at this level? Can someone offer
advice as to what I could be missing? Here is a stripped down version of my
class:
class CMFSkinsToolRules(SkinsTool):
#...
def getSkinByName(self,name):
#...
strSkinName = self.getSkinByRule()
#...
def getSkinByRule(self):
strSkinName = None
# HERE IS THE PROBLEM
objUser = getSecurityManager().getUser()
# objUser is always the Anonymous User
#...
#...
_________________________________________________________________
Choose an Internet access plan right for you -- try MSN!
http://resourcecenter.msn.com/access/plans/default.asp