Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] initialize_databases require list_db=True #58

Closed
loctv opened this issue Feb 21, 2018 · 3 comments
Closed

[Security] initialize_databases require list_db=True #58

loctv opened this issue Feb 21, 2018 · 3 comments

Comments

@loctv
Copy link

loctv commented Feb 21, 2018

In a use case with several databases, at initial database step call "odoo.service.db.exp_list(True)" to get all explicit db names. This was only accepted with config list_db=True. But I want to prevent listing databases entirely and use db_filter option.

# queue_job/runner.py
def get_db_names(self):
        if odoo.tools.config['db_name']:
            db_names = odoo.tools.config['db_name'].split(',')
        else:
            db_names = odoo.service.db.exp_list(True)
        return db_names
# odoo/service/db.py
def exp_list(document=False):
    if not odoo.tools.config['list_db']:
        raise odoo.exceptions.AccessDenied()
    return list_dbs()
@guewen
Copy link
Member

guewen commented Feb 23, 2018

Hi,

You have to set the db_name value (or --database in CLI) to the list of databases you want to use (separated by commas). This list of databases will be used by the cron and by the queue job.
db_filter is an option for the front-end.

@guewen guewen closed this as completed Feb 23, 2018
eantones pushed a commit to nuobit/queue that referenced this issue Oct 16, 2020
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
eantones pushed a commit to nuobit/queue that referenced this issue Oct 16, 2020
romi477 pushed a commit to romi477/queue that referenced this issue Oct 25, 2021
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
romi477 pushed a commit to romi477/queue that referenced this issue Oct 25, 2021
@eLBati
Copy link
Member

eLBati commented Oct 26, 2021

@guewen @loctv please have a look at #379

bizzappdev pushed a commit to BizzAppDev-Systems/queue that referenced this issue Nov 23, 2023
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
bizzappdev pushed a commit to BizzAppDev-Systems/queue that referenced this issue Nov 23, 2023
bizzappdev pushed a commit to BizzAppDev-Systems/queue that referenced this issue Nov 23, 2023
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
bizzappdev pushed a commit to BizzAppDev-Systems/queue that referenced this issue Nov 23, 2023
nguyenminhchien pushed a commit to nguyenminhchien/queue that referenced this issue Nov 25, 2023
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
nguyenminhchien pushed a commit to nguyenminhchien/queue that referenced this issue Nov 25, 2023
@NightTsarina
Copy link

Hi, this issue has been solved for v11 (#665), v12 (#379), v15 (#580), and v16 (#589); but two proposed fixes for v14 (#416 and #588) were not merged. Is there any chance this will be fixed for v14?

QuocDuong1306 pushed a commit to QuocDuong1306/queue that referenced this issue Sep 19, 2024
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
QuocDuong1306 pushed a commit to QuocDuong1306/queue that referenced this issue Sep 19, 2024
QuocDuong1306 pushed a commit to QuocDuong1306/queue that referenced this issue Sep 24, 2024
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
QuocDuong1306 pushed a commit to QuocDuong1306/queue that referenced this issue Sep 24, 2024
thienvh332 pushed a commit to thienvh332/queue that referenced this issue Oct 7, 2024
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
thienvh332 pushed a commit to thienvh332/queue that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants