[web2py] Re: Scope authenticated users in accounts

2011-08-15 Thread fishwebby
Fantastic, the request_tenant method is just what I was looking for! So this is what I've got working: def requires_account(f): """ Redirect to the account not found page if there is no account (decorator function) """ if not get_account(): redirect(URL('accounts', 'not_fo

[web2py] Re: Scope authenticated users in accounts

2011-08-15 Thread pbreit
I wonder if you could write some sort of custom validator that checks that the subdomain matches auth.user.account_id?

[web2py] Re: Scope authenticated users in accounts

2011-08-15 Thread Anthony
You might want to consider using this: https://groups.google.com/d/msg/web2py/NrvxeWQJvH0/wbafxppaf1QJ (note, 'request_precinct' has been changed to the more general 'request_tenant', as noted later in that thread). Otherwise, I suppose you could use the Auth groups functionality ( http://web2p