how to restrict user from selecting database

Asked by Joel Cabral

how can I restrict to change or select database name. I remember I have read an article on how to do this but i forgot where I read that article. from the login window the usual selection database field becomes a character field. do you have any idea on how will I be able to do this.

thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello Joel,

By starting your server (In terminal ) using --no-database-list option by following way:
./openerp-server.py --addons-path=../../addons/ --no-database-list

Hope this will help you.

Thanks.

Revision history for this message
Joel Cabral (hephaestus) said :
#2

Hi vra,

I've tried this command but I got this error

Usage: openerp-server.py [options]
openerp-server.py: error: no such option: --no-database-list

thanks,

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#3

Hello Joel,

You can check by your self by -h option by following way:

vra@vra-desktop:~/workspace/server_5.0/bin$ python2.5 ./openerp-server.py --addons-path=../../addons-5.0.6/ -h <Press Enter>
Usage: openerp-server.py [options]

Options:
  --version show program's version number and exit
  -h, --help show this help message and exit
  -c CONFIG, --config=CONFIG
                        specify alternate config file
  -s, --save save configuration to ~/.openerp_serverrc
  --pidfile=PIDFILE file where the server pid will be stored
  -n INTERFACE, --interface=INTERFACE
                        specify the TCP IP address
  -p PORT, --port=PORT specify the TCP port
  --net_interface=NETINTERFACE
                        specify the TCP IP address for netrpc
  --net_port=NETPORT specify the TCP port for netrpc
  --no-netrpc disable netrpc
  --no-xmlrpc disable xmlrpc
  -i INIT, --init=INIT init a module (use "all" for all modules)
  --without-demo=WITHOUT_DEMO
                        load demo data for a module (use "all" for all
                        modules)
  -u UPDATE, --update=UPDATE
                        update a module (use "all" for all modules)
  --cache-timeout=CACHE_TIMEOUT
                        set the timeout for the cache system
  --stop-after-init stop the server after it initializes
  --debug enable debug mode
  --assert-exit-level=ASSERT_EXIT_LEVEL
                        specify the level at which a failed assertion will
                        stop the server. Accepted values: ['info',
                        'debug_rpc', 'warn', 'critical', 'error', 'debug',
                        'notset']
  --price_accuracy=PRICE_ACCURACY
                        specify the price accuracy

  SSL Configuration:
    -S SECURE, --secure=SECURE
                        launch server over https instead of http
    --cert-file=SECURE_CERT_FILE
                        specify the certificate file for the SSL connection
    --pkey-file=SECURE_PKEY_FILE
                        specify the private key file for the SSL connection

  Logging Configuration:
    --logfile=LOGFILE file where the server log will be stored
    --syslog Send the log to the syslog server
    --log-level=LOG_LEVEL
                        specify the level of the logging. Accepted values:
                        ['info', 'debug_rpc', 'warn', 'critical', 'error',
                        'debug', 'notset']

  SMTP Configuration:
    --email-from=EMAIL_FROM
                        specify the SMTP email address for sending email
    --smtp=SMTP_SERVER specify the SMTP server for sending email
    --smtp-port=SMTP_PORT
                        specify the SMTP port
    --smtp-ssl=SMTP_SSL
                        specify the SMTP server support SSL or not
    --smtp-user=SMTP_USER
                        specify the SMTP username for sending email
    --smtp-password=SMTP_PASSWORD
                        specify the SMTP password for sending email

  Database related options:
    -d DB_NAME, --database=DB_NAME
                        specify the database name
    -r DB_USER, --db_user=DB_USER
                        specify the database user name
    -w DB_PASSWORD, --db_password=DB_PASSWORD
                        specify the database password
    --pg_path=PG_PATH specify the pg executable path
    --db_host=DB_HOST specify the database host
    --db_port=DB_PORT specify the database port
    --db_maxconn=DB_MAXCONN
                        specify the the maximum number of physical connections
                        to posgresql
    -P IMPORT_PARTIAL, --import-partial=IMPORT_PARTIAL
                        Use this for big data importation, if it crashes you
                        will be able to continue at the current state. Provide
                        a filename to store intermediate importation states.

  Internationalisation options:
    Use these options to translate OpenERP to another language.See i18n
    section of the user manual. Option '-d' is mandatory.Option '-l' is
    mandatory in case of importation

    -l LANGUAGE, --language=LANGUAGE
                        specify the language of the translation file. Use it
                        with --i18n-export or --i18n-import
    --i18n-export=TRANSLATE_OUT
                        export all sentences to be translated to a CSV file, a
                        PO file or a TGZ archive and exit
    --i18n-import=TRANSLATE_IN
                        import a CSV or a PO file with translations and exit.
                        The '-l' option is required.
    --modules=TRANSLATE_MODULES
                        specify modules to export. Use in combination with
                        --i18n-export
    --addons-path=ADDONS_PATH
                        specify an alternative addons path.

  Security-related options:
    --no-database-list disable the ability to return the list of databases
    --enable-code-actions
                        Enables server actions of state "code". Warning, this
                        is a security risk.

Hope this will help you.
Thanks.

Can you help with this problem?

Provide an answer of your own, or ask Joel Cabral for more information if necessary.

To post a message you must log in.