Brilliant !
Thanks a lot. I followed your advice. This is what I did :
 
 
 def my_auth_processing(form):
    if db(db.invitation.token==request </examples/global/vars/request>.args(
0)):
        return True
    else :
        return False

def user():
    """
    exposes:
    http://..../[app]/default/user/login
http://..../[app]/default/user/logout
    http://..../[app]/default/user/register
    http://..../[app]/default/user/profile
    http://..../[app]/default/user/retrieve_password
    http://..../[app]/default/user/change_password
    use @auth.requires_login()
        @auth.requires_membership('group name')
        @auth.requires_permission('read','table name',record_id)
    to decorate functions that need access control
    """
    if auth().accepts(request </examples/global/vars/request>.vars, 
session</examples/global/vars/session>, 
onvalidation=my_auth_processing):
        return dict(form=auth())
    else:
        redirect </examples/global/vars/redirect>('Registration requires 
invitation.')
 
Now the registration works for people who are invited. But when I log out, I 
can no longer click on "login" and "register". I get the error message : 
"404 not found". Is that easy to correct ?
 
Thanks a lot,
Dwayne
 

Reply via email to