I'm experimenting with this approach and cannot find a way to allow users 
that belong to different tenants to have the same username.  Is this 
possible?

On Wednesday, January 27, 2016 at 6:22:09 PM UTC-5, Massimo Di Pierro wrote:
>
> You could use multi-tenancy
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Common-fields-and-multi-tenancy
>
> On Wednesday, 27 January 2016 17:05:57 UTC-6, Cody Landry wrote:
>>
>>
>> I'm working on a project using web2py and we'd like to use the built in 
>> auth, however we need to authenticate on a combination of company and 
>> username (ie the same username can be used with different companies) Adding 
>> the field to the auth forms is easy enough, but after looking at the auth 
>> source, I only see email and username as options for login with the 
>> exception of using a Centralized Authentication System (CAS). (not an 
>> option)
>>
>>
>> One idea we've had is presenting the company, username and password to 
>> the user and combining them into 'company/username' internally. We could 
>> possibly use virtual fields and the filter_in/filter_out methods to do this.
>>
>>
>> Is there a better/cleaner way of accomplishing this?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to