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
I wonder if you could write some sort of custom validator that checks that
the subdomain matches auth.user.account_id?
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
3 matches
Mail list logo