On a second (or third) thought.

By default in trunk

auth.settings.block_registration=False
auth.settings.gmail_login=True

you can also allow only gmail logins

auth.settings.block_registration=True
auth.settings.gmail_login=True

or block them all

auth.settings.block_registration=True
auth.settings.gmail_login=False

Then block_registration==True people can still register but their
database field registration_key will contain "pending". Until this
field is pending, they cannot login nor retrieve password. Only the
administrator can replace "pending" with blank and restore access.

I could use some tests of these features.... please let me know if you
can.

Massimo





On 29 Apr, 14:46, mdipierro <[email protected]> wrote:
> for security I made
>
> auth.settings.gmail_login=False # by default
>
> change it to true to try this out.
>
> On 29 Apr, 13:19, Alexei Vinidiktov <[email protected]>
> wrote:
>
> > Thanks, this time I could successfully login. Haven't tried it on GAE
> > yet though.
>
> > I think it's a very useful feature, and google openid support you are
> > working on is also something I'm looking forward to.
>
> > On Thu, Apr 30, 2009 at 2:04 AM, mdipierro <[email protected]> wrote:
>
> > > please try again. I fixed it. sorry.
>
> > > On 29 Apr, 12:48, Alexei Vinidiktov <[email protected]>
> > > wrote:
> > >> When I tried to login  (from localhost) with my gmail.com credentials
> > >> I got this ticket:
>
> > >> Error traceback
>
> > >> Traceback (most recent call last):
> > >>   File "C:\Users\Alexei\Documents\web2py-read-only\gluon\restricted.py",
> > >> line 102, in restricted
> > >>     exec ccode in environment
> > >>   File 
> > >> "C:/Users/Alexei/Documents/web2py-read-only/applications/authtest/controllers/default.py",
> > >> line 14, in <module>
> > >>   File "C:\Users\Alexei\Documents\web2py-read-only\gluon\globals.py",
> > >> line 83, in <lambda>
> > >>     self._caller = lambda f: f()
> > >>   File 
> > >> "C:/Users/Alexei/Documents/web2py-read-only/applications/authtest/controllers/default.py",
> > >> line 8, in user
> > >>     def user(): return dict(form=auth())
> > >>   File "C:\Users\Alexei\Documents\web2py-read-only\gluon\tools.py",
> > >> line 409, in __call__
> > >>     return self.login()
> > >>   File "C:\Users\Alexei\Documents\web2py-read-only\gluon\tools.py",
> > >> line 617, in login
> > >>     first_name=email[:-10],
> > >> NameError: global name 'email' is not defined
>
> > >> In file: 
> > >> C:\Users\Alexei\Documents\web2py-read-only\applications\authtest/controllers/default.py
> > >> # # sample index page with internationalization (T)
> > >> def index():
> > >>     response.flash = T('Welcome to web2py')
> > >>     return dict(message=T('Hello World'))
>
> > >> # # uncomment the following if you have defined "auth" and "crud" in 
> > >> models
> > >> def user(): return dict(form=auth())
> > >> # def data(): return dict(form=crud())
> > >> # # tip: use @auth.requires_login, requires_membership, 
> > >> requires_permission
> > >> def download(): return response.download(request,db)
>
> > >> response._vars=response._caller(user)
>
> > >> On Thu, Apr 30, 2009 at 12:21 AM, mdipierro <[email protected]> 
> > >> wrote:
>
> > >> > There is a new feature in trunk. When you try to login using Auth and
> > >> > you do not have an account but use credentials from a valid gmail.com
> > >> > account, the system will automatically register you and let you in.
>
> > >> > I do not know if it works on GAE too. Could somebody try it?
>
> > >> > I am also trying to add support for google openid....
>
> > >> > Massimo
>
> > >> --
> > >> Alexei Vinidiktov
>
> > --
> > Alexei Vinidiktov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to