[web2py] Re: Authorization w/ Janrain

2012-07-11 Thread Dave
That may be just the ticket. Especially if I modify the list to be a db table that can be maintained by the site admin. I will give that a try and see what I come up with :) On Tuesday, July 10, 2012 6:15:23 PM UTC-4, Massimo Di Pierro wrote: > > How about this: > > AUTHORIZED_EMAILS = ['t...@

[web2py] Re: Authorization w/ Janrain

2012-07-10 Thread Massimo Di Pierro
How about this: AUTHORIZED_EMAILS = ['t...@example.com'] url1 = URL('default','you_are_not_authorized') auth.settings.extra_fields['auth_user']=[Field('authorized','boolean',default=False,compute=lambda row: row.email in AUTHORIZED_EMAILS)] if auth.user and not auth.user.authorized and not URL()

[web2py] Re: Authorization w/ Janrain

2012-07-10 Thread Dave
Agreed. It is not a Janrain specific issue, I am sure the same applies for other non-local authentication schemes. In other systems I have implemented in the past I would allow authentication externally, but configured authorization separately. An example from my past: I have a webapp that

[web2py] Re: Authorization w/ Janrain

2012-07-10 Thread Massimo Di Pierro
Your problem is limiting the number of users who can sign in. I am not sure this is a janrain issue. You need to handle it somehow at the web2py level and it should be independent on which method you use for authentication (janrain or other). It can be done but how it is done depends on the deta