Well now after my DAL I have Instructions
db = DAL ('postgres :/ / postgres: passwd @ localhost: 5432/mybd')
db._common_fields=Field('request_tenant',default=request.env.http_host,writable=False,readable=False)]

What happened? in all my tables I have request_tenant the field, and
when I do a drive automatically writes the localhost: 8000. But now
how is that several users with different hosts with dhcp changing its
access each time with a different ip that can work?

this post from Massimo does exactly what I want with the school he has
provided for various and simultaneous access, I could spend the
Massimo setting this app?

http://www.mail-archive.com/[email protected]/msg64351.html

       Ovidio Marinho Falcao Neto
                Web Developer
             [email protected]
          [email protected]
                 ITJP - itjp.net.br
               83   8826 9088 - Oi
               83   9334 0266 - Claro
                        Brasil



2012/6/28 Massimo Di Pierro <[email protected]>:
> Do me the issue is, should all data always be filtered by hospital.
> If there should only be filtered in some cases and not in other, use
> explicit queries
> If some tables are always filtered and some are not, you may want to use the
> tenant feature.
>
>
> On Thursday, 28 June 2012 05:45:13 UTC-5, Ovidio Marinho wrote:
>>
>> I can not split into separate database, as the management reports need
>> to filter all information. What I need is that the data are shown to
>> hosptal (1) is only seen by him. No problem if all hospitals being in
>> the same database, so is the question of security in view. When the
>> login Hospital (1) is made only data related to hospital (1) should
>> appear on the screen.
>>
>>
>>
>>
>>        Ovidio Marinho Falcao Neto
>>                 Web Developer
>>              [email protected]
>>           [email protected]
>>                  ITJP - itjp.net.br
>>                83   8826 9088 - Oi
>>                83   9334 0266 - Claro
>>                         Brasil
>>
>>
>>
>> 2012/6/27 Massimo Di Pierro <[email protected]>:
>> > I would suggest you use a different database (a different connection
>> > string)
>> > for each hospital depending on the hostname.
>> >
>> > <hospital>.domain.com
>> > import re; regex = re.compile('.*\://(.*?)/.*
>> > db = DAL('postgresq://..../%s' %
>> > regex.match(request.env.http_host).group(1))
>> >
>> > In this way you keep your data separate (which is better for security)
>> > and
>> > will allow you scale horizontally by setting up multiple db server
>> > instances.
>> >
>> >
>> >
>> > On Wednesday, 27 June 2012 18:07:44 UTC-5, Ovidio Marinho wrote:
>> >>
>> >> I am making an application to control government medical appointments
>> >> in more than fifty hospitals all use a single postgres database, but
>> >> each hospital must have administrator access, Operator and User, and
>> >> each access must be made with the view of their unique data .
>> >>
>> >> is this.
>> >>
>> >>
>> >

Reply via email to