On 13 Mar 2006, at 19:23, Karl Guertin wrote:

> Have you posted an updated set of docs? I recall you saying that you
> were updating the docs for identity several times but I don't remember
> actually seeing any updates.

Please! I'm failing to get identity to work at all. Currently I have
a db and requests to /secured get sent to the login page. The trouble
is that whatever I enter I always get sent back to the login page.


     @turbogears.expose( html="test.templates.login")
     def login(self, *args, **kw):
         if hasattr(cherrypy.request,"identity_exception"):
             msg= str(cherrypy.request.identity_exception)
             userId= getattr( cherrypy.request.identity_exception,  
"userId", None )
         else:
             msg= "Please log in"
             userId= None
             cherrypy.response.status=403
         return dict( message=msg, previous_url=cherrypy.request.path,
                      userId=userId,  
original_parameters=cherrypy.request.params )

     @turbogears.expose( html="test.templates.secured" )
     @identity.require( identity.in_group="admin" )
     def secured( self ):
         return dict()

If I enter a valid username/password combo however I do get a  
"Welcome: admin"
message in the top right of my login screen, which is progress of a  
sort...

In [16]: TG_Group.get(1)
Out[16]: <TG_Group 1 groupId=u'1' displayName=u'admin'  
created='datetime.datetime...)'>

In [17]: TG_User.get(1)
Out[17]: <TG_User 1 userId=u'admin' emailAddress=u'something'  
displayName=u'Admin' password=u'password'  
created='datetime.datetime...)'>

In [19]: TG_Group.get(1).users
Out[19]: [<TG_User 1 userId=u'admin' emailAddress=u'something'  
displayName=u'Admin' password=u'password'  
created='datetime.datetime...)'>]


Many thanks,

Arthur

-- 
One secret of happiness is to ignore comparisons with people who are  
more successful than you are: always compare downwards, not upwards”  
- Richard Layard



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to