Community mailing list archives

community@mail.odoo.com

Re: Dev Advice

by
DevCO Colombia , David Arnold
- 06/10/2016 08:13:07

Nhomar, Cody, Holger, thanks! I see now! Good idea!! Best

Cody Kitterman <ckitterm@gmail.com> schrieb am Do., 9. Juni 2016 um 23:07:
David:

Thanks again for responding to the github ping... He's saying you can create several roles and use them in conjunction with several config files: create the roles, use a different one in each config file, and either point to a different template or don't...
$ sudo su - postgres
-bash-4.3$ pg_ctl -D /db_directory start
-bash-4.3$ psql
postgres=# \du
CREATE ROLE tester_a LOGIN CREATEROLE CREATEDB PASSWORD 'tesser';
CREATE ROLE
CREATE ROLE tester_b LOGIN CREATEROLE CREATEDB PASSWORD 'tesser';
CREATE ROLE
...
postgres=# \du
                             List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication | {}
tester_a | Create role, Create DB | {}
tester_b | Create role, Create DB | {}
...
postgres=# \q
:: Configuration file #1 ::
db_user = tester_a
db_password = tesser
db_template = template1

:: Configuration file #2 ::
db_user = tester_b
db_password = tesser
db_template = template1

...

:: Configuration file #5 ::
db_user = tester_e
db_password = tesser
db_template = some_template_you_come_up with

(Maybe you want to include PL/Python in this template)

...

It's what I've been doing and so I'll second the advice.

R/S
Cody K.


On Thursday, June 9, 2016, Nhomar Hernandez <nhomar@vauxoo.com> wrote:

On Thu, Jun 9, 2016 at 8:51 PM, David Arnold <dar@devco.co> wrote:
Holger, thanks, didn't know about db filters regex capas! Even better!! What did you mean by virtual users? I think I didn't understand you.. Thanks!

About users:

Create a user in postgres by env/topic, then use it then odoo will see only BD's properly contextualized.


--
Nhomar Hernandez
CEO Vauxoo.
Twitter: @nhomar
Odoo Gold Partner
Skype: nhomar00 (Envia mail previo no lo superviso siempre).
Móvil Venezuela:
+58 4144110269
Móvil México:
+52 1 4773933942

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe